Designing modern Desktop GUI - qt

I want to develop a desktop program, and one of the most important criteria is having a wonderful user interface - both in terms of usability and style. When I say style, I mean the cool designs (and effects) that one normally associates with Android/Apple applications. I wish to design a user interface, similar (or inspired from) to the one designed for Light Table by Chris Granger. Here's the link to Light Table: http://www.kickstarter.com/projects/ibdknox/light-table
Even Autodesk Maya has been designed using Qt.
Also, I wish to design the interface by drag-n-drop methods, so I finish the interface part quickly and move on to other important parts of the program.
I've worked with Java Swing and AWT. But they provide native interfaces, which are good and easy to use, but doesn't fit the style/cool factor. So I tried Qt. Qt is a major improvement over Swing, I felt. But being new to it, I haven't been able to judge it's full capability. Interfaces of VLC and Maya have been designed with Qt, so I know Qt is the way to go.
Now, Qt provides two major tools for UI design - Qt Designer and Qt Quick.
Their docs and site say that Qt Designer should be used for Desktop applications and that it would give you a native style interface. But I don't want a native style interface. Qt Quick on the other hand, promises to give me exactly what I want (stylish looks etc), but their doc says Qt Quick is to be used for Mobile Application.
Is it possible to use Qt Quick for desktop UI design?
Or, is it possible to extract out of Qt Designer, the kind of design I wish to implement?
I also liked the Autodesk Maya interface design and would like to give my program that kind of touch.
Besides, are there other or better cross-platform tools for UI design. Another reason for me choosing Qt is it is cross-platform. I want my program to run on Linux/Windows/Mac all the same.

Related

which Qt project type we should use?

New to Qt. In the official Qt tutorial, it says:
To set up a project, you first have to decide what kind of an application you want to develop: do you want a user interface based on Qt Quick or HTML5 or Qt widgets.
We plan to use Qt to do medical image display, and also use Qt to build a GUI application to control a medical device. They will be two different projects.
Which Qt project type we should use for them?
Docs say:
QWidgets are a better choice if your UI is comprised of a small number of complex and static elements, and QML is a better choice if your UI is comprised of a large number of simple and dynamic elements.
I say:
If you're going for desktop applications I'd suggest Qt Widgets, you don't have to ship the final app with libs for QML and the whole source will be written in C++ (faster, simplier so easier to debug).
QML would be a nice alternative if you want to create phone/tablet (touch experience in general).
I would argue that between Qt Quick and Qt Widgets there is no objectively right answer. In theory, one should be able to replicate any UI using either method - because at the end of the day, they are both using QtGui behind the scenes. So functionality is probably not an issue.
One thing to note is that Qt Quick (i.e., QML) is designed explicitly to make UI programming require much less code, and much less C++ knowledge. I would say it achieves this goal very well.
However, at the end of the day, I think it mostly comes down to what language your developers are already familiar with. If you have a team of C++ pro's, then I would go with Qt Widgets - if only because it's going to be very easy for them to pick up, and it's something they're already familiar with. (I'm guessing this is the case because you're already writing C++ code for your project).
If, on the other hand, your developers are already very good at QML (or, more generally, JavaScript - which QML is heavily influenced by), then I would go with Qt Quick for the same reasons.
I know of two types of Qt UI: Qt Quick and widgets.
Widgets behave like most other UI toolkits out there, you have a GUI editor and a tree of UI objects. They are pretty mature and look like most standard UIs.
Qt Quick is the newer Qt UI toolkit. It uses a domain specific declarative language (QML) to specify the user interface and JavaScript for interactions. There are also plans to offer Qt widgets inside the Qt Quick framework, but I'm not sure how far that project has gotten. Qt Quick is meant to deliver more dynamic / custom user interfaces.
As far as I know Qt will continue to support both approaches in the foreseeable future so which one you pick depends on your use-case.

Qt 5 General Questions about QT / QML and Widget customizations

I am an iOS / Cocoa developer looking to port one of my apps to PC platform. I don't care to code multiplatform and maintain one app. I will continue using cocoa and cocoa touch for iOS Mac Development.
I have chosen to use QT 5 for PC, I am not sure if its wise choice but its easy and I can understand c++. If its not please point me to the correct direction.
My App is not hugely complicated, but needs some special customization e.g. ListView that looks like an iOS Table View, uses custom rounded windows with twitter bootstrap style search box and I want to monitor some global OS events like keystrokes, and what other applications the user is currently working with. I also use SQLite and AES encryption.
My questions is regarding UI customization.
Should I start studying and use QML for that? I am not sure what exactly it is, seems extremely simple CSS like, but I have the feeling is more designed for embedded devices and have limitations...
Do I have access to the entire power of QT if I use QML ?
What other options I have to customise widgets instead using QML (e.g. in objective C we use subclassing and drawing whatever we want or handling events...)
I am inexperienced in windows platform. Should I use VisualStudio C++ instead of QT5? With the changes in ownership I feel somehow insecure.
Yes you should. QML is declarative language which allows javascript to be executed within it. And you can do almost anything UI related with QML. If you don't have some particular UI element you can draw it in plain C++(Qt) and use it in the QML. So QML is the best choice for Qt development at the moment. It is not like CSS though, it is much more powerful.
Yes you have all the power Qt has and additional power which declarative language may offer - simplification of UI development process as well as modern decomposition of UI&logic.
You have this option in plain C++ Qt, you may subclass widget, redraw them, change behavior etc. This approach is inferior to the QML one.
This point doesn't make sense. Some people count Visual C++ like separate language which is wrong. You may count Visual C++ as C++ + some minor extensions MS compiler has. But it is as ridiculous to refer as GCC C++. So basically you can use Visual Studio with Qt almost without a pain if you use Qt integration add-in which is freely available. Or you can choose Qt creator, which some people count as superior to MSVS. It is up to you what to choose, but I believe for the novice it is much simpler to use Qt creator with Qt. But note you will need to have some compiler because Qt creator is just an IDE it should use some 3rd party compiler(either MS or GNU one)
You can use QML Desktop Components to build easily your application:
https://web.archive.org/web/20121203050945/http://blog.qt.digia.com/blog/2012/06/06/desktop-components-for-qt-5/
http://qt-project.org/wiki/Qt_Quick_Components
Anyway I recommend you use Qt Widgets and Qt Style Sheets to costume your widgets:
http://qt-project.org/doc/qt-4.8/stylesheet-reference.html

Is Qt Quick the way to go to build a modern GUI for a C++ application?

After 4 years of absence I'm finally coming back to Qt development again. I'm quite impressed by the development it has gone through, but also a bit confused by Qt Quick, which got just introduced in Qt 4.7
For me it seems like something to build a quick, appealing GUI with some logic in Java Script. However, if I'm going to build a C++ application, is Qt Quick also the modern way of building a GUI for that or should I follow the classic path by using the .ui files?
Qt Quick should fill a much needed gap but whether that means it will become the way to build applications will largely be determined on the type of applications you intend to build.
Qt has provided .ui files for a long time. These files are easy to work with when you need to create applications based on standard widgets. Designer makes it easy to layout the widgets and do other basic operations.
Qt 4.2 introduce style sheets (qss) that made it possible to style existing widgets. These styles are convenient ways of styling the standard widgets to get away from the standard widgets' look-and-feel, while retaining basic functionality.
But sometimes you need to create custom widgets, widgets that don't exist. Before Qt quick, the only way to do this was to write native code (be it C++ or, with language bindings, Python or Ruby). With Qt Quick it's now quite possible to write widgets and full blown UIs that would otherwise be somewhat painful to write in code. Because Qt quick's focus is on the UI, it's becomes a better development language for that goal. The Qt Quick paradigm also transcends the idea of strict standard widgets, adding support for transitions and boundary-less widgets.
The answer really depends on the type of application you're planning to build and I consider the description provided on the page you linked to very accurate:
"Qt Quick helps programmers and designers collaborate to build the fluid user interfaces that are becoming common in portable consumer devices, such as mobile phones, media players, set-top boxes and netbooks."
At the moment, Qt Quick is certainly not the most obvious choice if you're planning on building a classical desktop application, an area of development which the Qt library traditionally excels at, and in this case you're probably better off using what you call "the classic .ui approach"; at the same time, I think that's the exact reason why Qt Quick was introduced: to add a new tool to facilitate the development (or rapid prototyping) of applications not focused on the desktop.

Does JavaFX have a "native look and feel" option like Swing?

It's been a couple of years since I've done any Java work, my last efforts were using Swing. I'm poking around with a cross-platform client app that will interact with a Rails web service. JavaFX is one of the options I'm considering, but I'm concerned at the out-of-the-box aesthetic. Does JavaFX have a native look and feel option for the JavaFX controls (not Swing)?
I'm getting the impression that if I want to build a line of business application in Java, I should probably stick with Swing which is a shame since I like some of the features of JavaFX like binding, a terse syntax, and easy support for REST client programming.
I haven't see that. At best, you can use the extensive support of CSS styling we got with 1.3 to mimic native look and feel, but that's a big job! Not even sure how to deal with various themes we got on modern systems...
I suppose the point of RIAs is to bring their own look or to be flexible enough to allow to do your own shinny look, not to look like a random bland application on your platform... :-)
(Now, if I like skinnable applications, I also appreciate GUI frameworks using native controls or looking as such, like Qt (vs. GTK+ for example), precisely to provide good old "bland" applications not breaking user experience.)
JavaFX 2.0 has only one Look by default that is called "Caspian".
With Java 8 a second one was introduced, called "Modena".
Both are cross-platform Look&Feels.
See announcement of Modena, with screenshots.
At the moment some developers create native Styles for JavaFX as OpenSource projects. You can find an overview here:
http://www.guigarage.com/2013/01/this-is-for-the-native-ones/
If you are interested in the Mac OS L&F (AquaFX) for JavaFX, here are some posts with previews:
http://www.guigarage.com/category/aquafx/
Native look and feel is not supported by Oracle in the default JavaFX 2.x distribution.
A proof of concept on button styles by one of the JavaFX developers demonstrates that JavaFX is flexible enough to generate widgets that look like native widgets.
For OS X, you can try the third party AquaFX style for JavaFX, which makes JavaFX applications look like native OS X applications. AquaFX appears quite complete and comprehensive to me.
There have been other 3rd party projects which partially create native look and feels for other platforms, but their coverage is currently nowhere near comprehensive.
Some third party projects (all of which seem currently experimental and incomplete) are:
JMetro in jfx-styles
javafx-native-themes (JavaFX look and feels for: default swing, iOS, windows 7...)
you could definitely embed some css in your application to make the javafx components look more like the standard swing look. With scene builder its actually really easy to get all your tags setup correctly.
Check this out
http://docs.oracle.com/javafx/2/css_tutorial/jfxpub-css_tutorial.htm
Interesting thing is in javaFx is, you can give the rich look and feel to native application also.You can apply css to the javaFx components. Not only that you can embed the HTML Css and pages in JAVAFX application.Which i can feel great revolution in terms of UI building for Standalone applications.

qt/wxwidgets third party components?

I'm used to working in a Delphi and C# environment which seem to have a rich set of third party components available. I'm currently wanting to do cross-platform programming in C++ using either qt or wxwidgets. Is there a large market for third party components? I was looking at sourceforge and that doesn't seem to show much that is useful (how the hell do you find out what components or features are in a project without downloading the source?). I'm thinking carousel/coverflow components, rich datagrids (like the sort DevExpress provide). Or is this, write your own territory?
There are a number of good quality third party Qt libraries, though I don't know of a centralized resource for finding them.
A few places to start looking:
http://www.ics.com/products/qt/addons
ICS provides the
QicsTable, a high performance
model-view-delegate table library,
and resells various libraries by
KDAB. (These are all available as a
free download.)
http://www.qtcentre.org/contest-first-edition/finalists
QtCentre has an annual
programming contest which awards
interesting Qt-based tools and
libraries. This year's contest is
still being judged, but the
finalists from last year can be seen
at the above link. Check out the
Custom Widget and Helper Library
categories.
There is a third-party component for Qt - advanced data grid - Qtitan DataGrid.
In it there are almost all necessary possibilities.
Ultra-fast processing of large data sets
Use of QStyle for rendering objects ensures that the grid blends into the UI design of any application
Two modes of vertical scrolling
Customizable colors of rows and columns
Two integrated table views
Column banding and grouping
Automatic width and height adjustment
Fixed columns
Flexible sorting
Column summaries
Integrated high-performance caching mechanism
Advanced paint engine for faster rendering of UI elements
Cross-platform support
API for external editors
Screenshots about this Grid
http://www.devmachines.com/qtitan_screenshots.php
For a crossplatform GUI development, Qt is the tool you should be looking for. I have used both. Here is what I feel about Qt
Building rich GUI is a piece of cake if you use Qt. It has a loads of GUI capabilities, starting with its Graphics View, OpenGL support, stylesheets that supports css. A mature painting system, Richtext formatting, Integration with Webkit, and I am sure I am missing a lot more here...
Qt has its own build system, qmake which creates platform dependent Makefiles, so no Makefile hassles. Moreover you get a single pro-file which is much easier to manage. For wxWidgets, you will need to create different Makefiles for the various compilers you intent to use.
Other advantages of using Qt over wxWidgets are - the Api is very easy to learn with its intuitive api, superb documentation and tons and tons of examples. This helps you get yourself productive pretty soon and thus getting your product early to marker. BTW Qt is a RAD tool. Moreover, there is a huge user base, and there are forums like QtCentre.org to help you with your questions.
If you are planning to buy commercial license, you get support directly from Qt Software (trolltech).
You would obviously be using Qt's Model View pattern, allowing you to separate your business logic from the presentation tier. I would suggest that you write to "support at trolltech dot com" or "sales at trolltech dot com" to get more information. You can explain your requirements and they would be able to explain how Qt fits your needs.
You could also download the opensource version and have look at the demos.
Coverflow: http://labs.trolltech.com/blogs/2007/11/02/pictureflow-on-windows-mobile/ , http://ariya.blogspot.com/2008/03/introducing-photoflow.html
As I said, if its Rich gui you are planning to develop, use Qt.
In addition to the ones by ICS and at QtCentre the Qt-apps website has some open source widgets/components for Qt.
For wxWidgets you have wxCode which has quite a few things although not all the existing third party components (including a few very useful ones) are available from there.
Good quality components for Qt can be found here - http://www.devmachines.com/
At the moment there are Microsoft Ribbon Control for Qt, DataGrid for Qt, Charting for Qt.
All components are commercial and should be used in Qt Commercial or Qt LGPL.

Resources