[Interest] Preferred way to create custom look-and-feel GUI

Jérôme Godbout jerome at bodycad.com
Tue May 10 15:50:25 CEST 2016


If you are not into an hurry, I would go Qt 5.6 and make sure you get the
new way to put style on Items in mind:Qt Quick Controls 2
http://blog.qt.io/blog/2015/11/23/qt-quick-controls-re-engineered-status-update/

It should be part of Qt 5.7
So if you're not into an hurry and can work on the rest of the thing of
your application, I would go Qml, keep the Controls component wrap into
custom Component, you will later skin it into that component, should be
fast and easy if you have it into mind.

You can also use a singleton (optionally with a loader to load current
theme) to keep many of the properties like color, dimension, scale, etc...


On Tue, May 10, 2016 at 3:05 AM, André Somers <andre at familiesomers.nl>
wrote:

>
>
> Op 08/05/2016 om 16:40 schreef Jan Müller:
>
>> Hello,
>>
>> I was wondering, what is the preferred way to create a GUI with a custom
>> look-and-feel appearance, similar as e.g. QtCreator.
>>
>> I have a modestly large application, using a QWidgets approach and I use
>> 'designer' to create the ui/layout.
>>
>> The application has several modes/screens, which are accessible at the
>> moment through a tabview widget.
>>
>> At the core of the application there is a QGLWidget, drawing lots of data
>> coming from the C++ core.
>>
>> I would like to make the application appear a bit more modern, e.g. with
>> custom look-and-feel buttons/spin-boxes etc.
>>
>> I recently discovered QML. Does it make sense to migrate to a QML based
>> approach? I'm thinking of creating the mainwindow together with buttons to
>> switch between the modes in QML. And instantiate my (c++ implemented)
>> OpenGL widget in QML (and make it derive from QQuickItem).
>>
>> Or should I stick with the QWidgets approach and use a stylesheet to
>> implement more 'fancy' looking things such as gradients and custom
>> look-and-feel components?
>>
>> What does QtCreator use to implement the GUI? For example the navigation
>> bar at the left with the "Welcome", "Edit", "Design", etc. buttons. I tried
>> to look into the sources of QtCreator, but got a bit lost.
>>
>>
>> There are multiple approaches possible. It depends a bit what you want to
> achieve. I think QML is very promising, but the components are still not
> very mature. That is only illustrated once more by yet another break in
> there with QtQuickControls 2.0. Still, cool things are possible. Showing
> OpenGL in QtQuick is certainly possible.
>
> However, you can also consider a more conservative approach. If widgets
> are serving you well and you just want a different look, you can also
> implement your own style. I would recommend that over using style sheets.
> Doing this will not give you fancy animations, but it will give you all the
> widgets goodness and stability that
> QML/Quick/Components/Controls/WhatEverItIsCalledToday so far is lacking.
>
> André
>
>
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160510/6f16128a/attachment.html>


More information about the Interest mailing list