Is there any framework that allows me to develop applications for Qt and GTK? - user-interface

I am thinking about something that would allow to develop applications independent of the GUI library, but allow Qt and GTK being plugged in as needed.

I'd just use Qt. It includes a Gtk-like style, mimics Gtk standard dialogs and even uses Gtk file dialogs if run under Gnome, so basically it integrates itself into Gtk as good as anything (except Gtk of course), or at least it integrates itself better into Gtk than Gtk does into Qt.

You can try to use wxWidgets but you tend to get "lowest common denominator" if you go that route. Your better bet is to design your software such that you can plug in an implementation of the necessary "views" in the desired toolkit, and keep your core UI toolkit independant.
Obviously this is more work, but if there is a strong business need, then so be it.

I don't know of any framework doing something like that (I don't know how it could possibly be done without suffering from a heavy "lowest-common-denominator" syndrome), but I do "cross toolkit" development (applications that use more than one GUI toolkit) and I wrote an article about why and how to do it:
http://www.hardcoded.net/articles/cross-toolkit-software.htm

You can try Tk, which supports themes. There is a tile-qt and tile-gtk theme. There is a 2010 Google Summer of Code project to improve these themes. And, of course, when you use Tk you also get support for Windows and OSX out of the box.

Qt is a framework, it uses GTK underneath (at least on Unix).
There was a mobile toolkit that let you write everything in JS but compiled to the native code on each platform. I forget the name but it was a victim of the iPhone lockdown.

Related

Easy GUI programming in Mac OS X. Targeting Windows Platform

I have a friend who has an entry-level background in programming and is looking for a free GUI framework (IDE, GUI toolkit and GUI designer ) that:
He can use on Mac OS X to build Windows applications
It's very easy to use.
He is not interested in becoming a programmer, but would like to build an application for his work (not CS-related).
What are some good GUI frameworks/prog. languages he can use?
Qt including Qt Creater and Qt Designer is worth a try.
Especially, if your app should finally run cross-platform, on phones or on other embedded devices. Qt natively supports C++, but can also be used with 3rd-party extensions with Python (PyQt) and probably other languages.
On a Mac I have to recommend making Cocoa applications in Xcode written in Objective-C. Xcode is free to download and use, you pay if you want to submit applications to the Mac App Store.
I personally use Xcode every day and I think it's a great IDE. Currently has compiler support for Obj-C, C++, C and maybe more (not sure). More importantly for your needs, Xcode does a great job of integrating your code with its build in "interface builder" to help you quickly and easily create a nice UI.
NOTE: Xcode includes a new compiler feature (ARC) Automatic Reference Counting which is create for a new user. You can learn the language without having to worry about manual memory management.
Your friend should consider using PySide, a Python binding for the Qt GUI framework already mentioned.
With PySide you can use the Qt tools to create GUI elements interactively
and code your application logic in Python, which is a language often appreciated by non-programmers (and programmers too!) for its simplicity and intuitiveness.
Xcode includes a WYSIWYG editor for native controls and views. This was formerly a separate program called Interface Builder, but the editor was moved into the Xcode IDE at version 4.
AppKit is the framework it uses in most cases -- that's Objective-C. It's well supported. Your friend can also use it for source code editing and building and debugging apps. If he wants to write UIs programmatically, Xcode and AppKit are also good options.

Transferring from web programming to GUI programming?

I've been doing web development for about six years now, and somehow have entirely avoided ever developing a desktop application.
I am considering writing a desktop application (I'm thinking something similar to a Word clone) on Linux but have no idea where to start. I hear of Qt and GTK+, but I'm curious if there are any frameworks that are similar to web development. Language isn't a problem, as long as it isn't Java.
You really want to go with Qt these days. Both Nokia and Intel are now pushing it as the main GUI in their new distro Meego. This means, if you are using Qt, you'll be able to target all their platforms (both desktop, embedded and phone domain), including all the platforms already supported by Qt.
Qt also comes with a GUI Designer and an IDE which will support you in the whole process, and soon there will be QML, which is a declarative UI language, for even more rapid development of apps.
Take a look here:
http://qt.nokia.com/products
http://www.youtube.com/watch?v=U7IgwNrcln8
http://www.youtube.com/watch?v=xoo_Ows1ExU
http://www.youtube.com/watch?v=Fr5FuGhTqm8
GTK+ and QT are GUI frameworks. They use xlib under the hood and encapsulate the nuances of xlib and provide you with an easier interface.
For rapid development you can use GLADE and quickly build GUI applications in C/C++.
Check out wxWidgets, it's another framework that is usually compared with Qt & GTK+
Go for Qt. And, if you are webdev, you will find in QML one of the best instruments EVER.
It has:
A Declarative approach to UI definition and Graphics elements Behavious/Animations
It's cool and simple at the same time
For now is only available in a couple of (old) binary drops, or by clone-compiling qt.gitorious.com/qt, branch ">4.7"
If you don't have to release today, but do you have time to develop and test, then QML should be "stable" by end H1 2010. If I got the schedule right ;-)

How to decide GUI Framework for desktop application project

I am working on a new small utility desktop application but I am not really able to choose the GUI framework to use. I have worked on both JAVA,C# and C++, so language is not really a constraint. My criteria are:-
A very well designed architecture, something like QT. It's better if it follows typical C++ design methodologies.
Layout management should be easy, intuitive and not really cumbersome. I hate adjusting pixels on screen.
Its license should be open.
It should look good :)
Mentioned QT seems to comply to all your requirements. QT has "deploy everywhere" attribute, whilst Java needs no deploying at all (it depends on what is use of your utility).
Ad. 2 QT has really convenient GUI designer.
Ad. 3 LGPL. Usually it is enough.
Ad. 4 It is always matter of taste. IMO QT4 looks awesome under linux, but it's windows look'n'feel is correct at best. It's strong point is, that without additional tweaks it almost everywhere looks native.
I've been using Swing, and it works fine. NetBeans (a decent IDE by itself) even supports graphical GUI building.
It's well designed (basically
everything is done with listeners,
functions that are registered for a
certain event). It has bindings, so
you don't have to write code to set
up a value in a text field or read
it out
Layout is not perfect, but
acceptable within NetBeans. It's
WYSIWYG (almost). Look-and-feel can
be changed on the fly.
License is free. Source-code is not
available, I think.
Looks fine on Windows and Linux,
less so on OSX.
You could always try SWT. The advantages of Java with the standard L&F of supported operating systems.
Well designed. Lots of
documentation, and very easy to
develop with. (If you know Swing,
you can pick up SWT in no time.)
I believe layout managers do exist
that support SWT. I'm not positive
about this though, as I typically
don't use layout managers too much.
Uses the Eclipse Public
License. Should meet most of
your requirements.
From Wikipedia on SWT:
SWT is written in Java. To display GUI elements, the SWT implementation accesses the native GUI libraries of the operating system using JNI (Java Native Interface) in a manner that is similar to those programs written using operating system-specific APIs. Programs that call SWT are portable, but the implementation of the toolkit, despite the fact that it is written in Java, is unique for each platform.
Hope that helps you.
I'd suggest wxWidgets if you want to program in C++ or wxPython (the python language binding of wxWidgets if you know or don't mind learning Python.
Architecture is similar to QT I think.
Layout using sizers. Quite easy once you get the hang of it.
Liberal open source license.
Widgets are native on all platforms (Windows, Mac OS X, Linux).

Selecting GUI on windows (wxPy vs pyQt)

We are planning to develop an application for monitoring and configuring our service (which is running on remote server). After long time of discussion, we decided for python as platform for our app, because we love and know python. But we don't know, what GUI toolkit preferred for our aims. We need fast (for development and running) app, whose users will be Admins, Maintainers and Account managers.
There are two GUI toolkit for python, which we know: wxPython and pyQT.
Anybody have arguments regarding pro and cons? And maybe someone knows any commercial applications, using these products (only python version of toolkits)? Links are desirable.
Thanks.
I choose wxPython after much research. The reasons were:
"wxPython in Action" book by Rappin & Dunn
The voluminous examples that come as part of the wxPython download
The number of projects that have used wxWidgets
The fact that wxPython code runs equally well on Linux, Mac OS/X and Win32
I did consider pyQT and other researchers are successfully using it. After writing many examples in all API's that I considered, I found wxPython ticked the most boxes for me.
As for Tkinter (TIX), I think it looks rather dated.
Unless you are using IronPython or Jython I would not consider using the associated native windowing APIs. For another project which is to be delivered exclusively on .Net, I plan to use WinForms after lots of great feedback from StackOverflow members.
Well, I am a fan of QT: it has a more modern look and feel. However - your choice should be based on your actual requirements. Simple trade studies are helpful for this. Make a list of what features your toolkit must have and what features would be nice to have and then weight each item appropriately. Then look at all your options (TKinter also) and then score them according to your feature list (using the weights you assigned to each feature requirement). At the end it should be evident which one is right for your project.
I've always liked Qt's "signals and slots" conceptual model, though I guess it may take a bit of learning for developers who are more used to other models of event propagation and handling. Personally, given a choice, I'd pick PyQt because of this programming aspect.
You wrote "There is two GUI toolkit for python, which we know: wxPython and pyQT." You are forgetting about the most obvious toolkit: tkinter. That's actually part of a core python distribution, no extra downloads required.
Some people don't like Tk but that's often due to ignorance. Tk is a fine choice for a cross platform toolkit. It uses native widgets on windows (and has for many years) and the latest versions of tk use themed widgets on all platforms.
i've been using wxpython for 3 years .. and now we had to switch into pyqt since qt is integrated in maya 2011 .. however , wxpython is more straight forward and you can easily start working on it and learn it from zero fast .it provides and awesome resources and decumentation . but QT provides more powerful features that you cant find in wxpython , for example ( the multi touch detection) , QT also provides good support for drawing devices like pc tablets and so on .
qt also provides a good designer that makes u create interfaces faster.
one of qt disadvantages is it's license since it's not free like wxpython
A Windows (and Mono) option for a GUI toolkit is provided by IronPython. It provides access to the Winforms and WPF libraries. For examples, see Developing with IronPython & Windows Forms, and many others.
If you want to expand the list of options, consider building a Web App instead of a (local) GUI app. You say your service runs on a remote server, so networking is part of your requirements.
Once you start down that road, Python provides a bewildering amount of options.
I want to point out two strengths that wxPython has compared to pyQt:
It uses native widgets on every supported platform. So the apps have a native look and feel. I'm aware that PyQt uses native styles, but the behavior ("the feel") is reported to be somewhat non-native especially on the Mac.
It provides a wider choice of widgets out of the box.
You should also check out PyGTK. It is similar to pyQT in programming model but does not have any licensing cost since it is LGPL. I always found it nice to work with as a developer. The main drawback over pyQT is that in some cases they take away functionality in things like file chooser dialogs in favour of simplicity for the user.

Create a small 'window-form' application that runs anywhere

I work in the embedded world, using mainly C and no GUI at all (because there is no display screen).
Moving over to the non-embedded world, in which I have nearly no experience, what is the best programming environment (langauge/IDE/etc) for me to build a simple window-form application that will run on all the common platforms: windows/linux/mac-os ?
I do not want to build a web-app.
I have my eye on Python and one of it's widget libraries, QT or WxWidgets. Is that a good option ?
I like GTK+ personally but that or any of the ones you mentioned should be OK. I don't know which is the best in terms of least RAM usage.
Both wx and QT have embedded/universal versions where the widgets are drawn directly.
They can both be called from python,but if you have a very small system python or py2exe might not be available.
Unless you want to embed HtmlWindow I'd go with wxWindows... works everywhere without problems so far for me.
I have both worked with PyQt and wxPython extensively.
PyQt is better designed and comes with very good UI designer so that you can quickly assemble your UI
wxPython has a very good demo and it can do pretty much anything which PyQT can do, I would anyday prefer PyQt but it may bot be free for commercial purpose but wxPython is free and is decent cross platform library.
Qt is a good choice to start with. In my opinion it has a best (easy to use, simple & informative) API Documentation. Package also includes many examples - from very basic to complex. And, yep, it`s truly crossplatform.
Check Qt Licensing page, the library is free only for GPL projects.
I`m using QDevelop as text editor, but there are many other alternatives - Eclipse, KDevelop, Code:Blocks, VS plugin & etc.
Why not use swing and java? It is quite cross platform, and looks reasonable for form apps. If you squint a bit and ignore the java, its quite pleasant - or alternatively, use one of them dynamic languages on the JVM (Groovy is my recommended one).
What kind of application is it going to be? Have you considered a web-based application instead? Web-based apps can be super flexible in that sense - you can run them on any platform that has a modern browser.
By far the simplest choice for creating native cross-platform applications is REALbasic. Give it a try and you'll have a working app for Mac OS X, Windows and Linux in minutes. No run-times or other stuff to worry about.
I think you should try Html Application.It is something like web page it contain DHTML,java script,ActiveX but it is execute like .exe .
Edit:
Sorry for advice you html application.I just know it can run on windows only.

Resources