Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QT looks like old application.



  • Goodmorning,
    I just started with QT, and coming from javaFX I noticed immediately that the QT applications are more "ugly" than those that generally see on modern PCs.
    For example, I attach two out-of-the-box example screenshots, one of QT and one of JavaFx, so the QT one is uglier than Java, it looks like an old application, with the look of a few years ago.
    I have seen on the QT website some very appealing and modern applications, how is it possible that the examples in QtCreator are so "ugly"?

    is there a way to create applications with a modern look in QT without spending hours on CSS?

    Thanks in advance, FM
    1_1526898953844_QT.PNG 0_1526898953843_JavaFX.png


  • Lifetime Qt Champion

    Hi
    The samples uses the plugin style for a given platform so it will look like like GUI widgets normally
    would on that platform.

    So if you want it to look differently, you can style it with CSS or
    make a new style plugin
    http://doc.qt.io/qt-5/qtwidgets-widgets-styles-example.html

    Also the OS draws the decorations ( caption, close buttons etc) so that's outside Qts control.

    Alternatively , you can use QML which allows for any look you like. But that is
    not traditional desktop widgets.

    So it really depends what you think needed to be done to look "modern"
    Toolbuttons can be flat too and some tweaking can be done on the widgets.


  • Moderators

    Hi @federico-massimi,

    Qt Widgets tries to mimic the native look-and-feel of your OS. What is your OS?

    @federico.massimi said in QT looks like old application.:

    Goodmorning,
    For example, I attach two out-of-the-box example screenshots, one of QT and one of JavaFx, so the QT one is uglier than Java, it looks like an old application, with the look of a few years ago.

    Some of the examples are very old. Which example did you run?

    I have seen on the QT website some very appealing and modern applications, how is it possible that the examples in QtCreator are so "ugly"?

    You will probably like the "Qt Quick" examples more. Try those.

    is there a way to create applications with a modern look in QT without spending hours on CSS?

    You don't need hours on CSS. You can "modernize" and old example by adding one line just before you construct a QApplication object: QApplication::setStyle("fusion");



  • @JKSH said in QT looks like old application.:

    QApplication::setStyle("fusion");

    thank you so much. It's much much better! I tried searching on the QT website, but how do I get a list of all available styles?


  • Lifetime Qt Champion

    @federico.massimi

    Hi
    its normally something like (Qt5.9)
    Windows
    WindowsXP
    WindowsVista
    Android
    Fusion
    Macintosh

    const QStringList styles = QStyleFactory::keys();
    for(QString s : styles)
    {
        qDebug() << s;
    }
    

Log in to reply