qt designer and data bound controls? - database

can I use QT Designer 4 to create / design tables or other controls with automatic binding to database connections?
Or must I write specific code for that in my application?
(i'm using python 2.5 with pyqt 4.8 on Windows xp, if it matters)
Thanks.

Yes, Qt supports this using the MVC model, but you need some code (not too much really) to make the Database connection and some settings of a QSqlTableModel, which can be later shown with a QTableView.

Related

Plugin for working with WinForms for JetBrains Rider (vb.net)

I have just switched from Java-development (where I used IntelliJ) to an old WinForms application in VB.net. I have decided to use Rider, since I really liked IntelliJ.
From what I understand Raider's WinForm designer does not yet support VB.net-WinForms.
So my question is if there is a plugin that supports WinForms designing in Raider (to avoid having to switch to VS and avoid using 2 different IDEs).
The Winforms designer from Rider does only support C# with WinForms under Windows. It has recently added support for other toolkits, maybe in a cross-platform manner.
The answer to your question is no: and I don't think they are going to include since there is probably not enough demand. You can still use Visual Studio for the designer and go back to Rider when that part is finished.
My personal advice is to avoid use any designer. WinForms is really easy to grasp, and there are tutorials out there that make the task even easier.
One possibility would therefore be to get rid of the designer files and manually modify the code. An important outcome is that the project will be then editable in any IDE, not only Visual Studio or others with compatible plugins.

Is there any cross-platform GUI framework that support data binding like in WPF?

Recently I'm working on a game project, and we need to develop some editors for designers to use. While other programmers are all working on Windows, I'm working on Mac OS X. I'm familiar with WPF and Windows Forms development and I'm looking for some GUI frameworks that support data bindings similar to WPF or Windows Forms development.
The GUI framework should satisfy these:
Cross platform
Support data bindings to object (like WPF or Windows Forms)
It's best that it support XML serialization because XML is our data format
By the way, I don't care about the programming language, GUI frameworks based on any programming language are all welcome.
Silverlight runs on MacOS.
It also runs out of browser so you can create an application that doesn't require the browser to be run and hence looks like a regular desktop application.
Depends on the platforms that you want to support, but you could have a look at Moonlight the mono port of silverlight. Have a look at the alternative section of this page:
http://www.mono-project.com/WPF
Knockout.js is said to be good. My colleagues prefer it over Wpf and Silverlight bindings. For instance if you have a fullname prop, which is a result of firstname and lastname, you have to hassle in Wpf with propertychanged, in Knockout.js you define it observable and the runtime makes it correctly notify its observers. It also supports validation.
Although it doesn't have data binding like WPF or Windows Forms, Real Studio does works wonderfully for creating cross-platform applications. And XML is supported, of course.
Try JavaFx, it supports binding better than Java Swing. Also styling is based on CSS instead of Microsoft proprietary style logic.
Both WPF and JavaFX will target the GPU for extra fast rendering; they are comparable and competitor technologies. But JavaFX is cross platform and less likely to be abandoned given Microsoft's track record.
http://www.oracle.com/technetwork/java/javase/overview/javafx-overview-2158620.html
Also, other answers here say Silverlight but Microsoft has abandoned this.

Silverlight client-side report generation using mvmm

we are developing a Silverlight 4.0 (C#, .NET 3.5) application using the MVVM design pattern.
Is it possible to create reports on the client-side with the existing ViewModels or does it have to be done on the server-side? On server-side we only have models and we don't want to copy our business logic to the server. I know ServiceHost is not available in Silverlight and we can't use a WindowsService. Non-free solutions are also welcome.
Thanks in advance
Thomas
It can certainly be done but to what extent you need is slightly up to you. Pete Brown posted an example on creating a simplistic report writer which may suffice based on your needs and is free; allowing you to build on top of the example as needed.
If you moved up to .NET 4 you could leverage the Silverlight Reporting project on codeplex.
telerik also offers a reporting package; however it is not free and requires the full .NET runtime for generation. Don't confuse the .NET runtime as an assumption that it must be server side generation as that is not the case.

Coexistence of Windows Forms and WPF

I need to make an application compatible with the all NET Framework: 2, 3, 3.5 and 4.
In addition I want to develop an application that when performed with a PC that has only installed Framework 2 the GUI is made with Windows Forms, but if the PC is using the Framework 3, or later, the GUI is done with WPF.
I have developed an application with NET 2 and Windows Forms.
I tested this application with NET 3, 4 and 3.5 and it works correctly.
I recently updated the GUI with WPF, these changes were simple, because I developed the interface with the databinding paradigm.
This choice has allowed me to switch from Windows Forms to WPF easily.
I overcame the problem of creating a single application (for Windows Forms) to be performed with any framework using this guide: http://msdn.microsoft.com/it-it/library/w671swch%28v=VS.100%29.aspx.
Now I wanted to make sure that if the PC was the NET 3.5 or higher installed the application using the GUI made with WPF.
I tried to follow some guidelines, such as: http://msdn.microsoft.com/it-it/library/433ysdt1.aspx, but unsuccessfully.
I am very confused about how to proceed.
The application should not install anything on the PC, just use what is there.
Thanks in advance,
Talao.
If your application needs to be compatible with all of those versions then what you're really saying is: it needs to be a .NET 2 application. A .NET 3 (or higher) application simply won't work otherwise, because it won't find the assemblies it needs at startup.
That said, since .NET 3 is built on .NET 2, I'm sure you could find a way to dynamically load the .NET 3 assemblies if the framework is available. This isn't going to be pretty, though.
Even if you manage this, however, the fundamentals of an application are very different under WinForms and WPF, so you'll find you're rewriting a lot of code. Simply replacing the View of an MVC application isn't likely to be enough (unless you're willing to write some really complicated views...).
My suggestion would be either to write two applications or - for preference - write it in .NET 4 and include the framework as part of your installer. Assuming this is a commercial application then it's either that or just stick with WinForms - I can't imagine the development overhead is likely to be worthwhile.
The simplest solution I can think of is to develop the GUI using MVC/MVP pattern. Where the view is either a Winform form or a WPF form. You then developed each view as a WinForm Form and as a WPF form.
At startup of the application, call Environment.Version to get the framework version. Based on this version you can tell the application to load with WPF or Winform views. If greater than or equal to the 3.5 framework, use WPF, else use WinForm views.
The other approach is using compatible controls, where you can put WinForms inside WPF controls, however you lose the power of WPF by doing so, so this is only good to bring in a few WinForm controls to a mostly WPF application.
Did you consider creating multiple applications, one for each user interface? If you have business logic and user interface separated, than this should not be much of a problem.
Then installer analyzes target system and determines which executable, Winforms or WPF, is going to be installed.

Problem with using IntermediateSerializer outside an XNA project

I'm currently working on an Xbox360 game. In this game I have lots of data stored in XML. Deserializing it through IntermediateSerializer in the XNA Game project is no problem, works like a charm. But since these structures stored in XML can be quite complicated I decided to make a simple editor for the stuff, so I (or maybe a less experienced user) could edit the objects visualy (animations, game stages etc) rather than having to write these data as XML. Then I would serialize it through the IntermediateSerializer and everything would be fine.
For this editor I created a WPF project, and referenced the Microsoft.Xna.Framework.Content.Pipeline.dll
Visual Studio recognizes the IntermediateSerializer class, and intellisense helpfully recommends to use the Microsoft.Xna.Framework.Content.Pipeline.Serialization.Intermediate namespace, but I keep getting the following error message:
The type or namespace name 'Pipeline' does not exist in the namespace 'Microsoft.Xna.Framework.Content' (are you missing an assembly reference?)
(I'm using XNA 4.0 and .NET 4)
Am I doing something wrong or is this just simply impossible?
Tenshiko
In your Application Properties ensure
that the Target framework is set to
.NET Framework 4.
By default a new WPF application targets the .NET Framework 4 Client Profile. The Client Profile is designed to reduce the download size of the .NET Framework for end users and excludes assemblies that are only used in development. In your case Microsoft.Xna.Framework.Content.Pipeline.dll depends on Microsoft.Build.Framework and Microsoft.Build.Utilities.v4.0 which are not available in the Client Profile.
It seems to me that you did set a target framework of your WPF application to ".NET Framework 4". It has to help.

Resources