Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QT looks like old application.
Forum Updated to NodeBB v4.3 + New Features

QT looks like old application.

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 3.8k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    federico.massimi
    wrote on last edited by
    #1

    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

    JKSHJ 1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      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.

      1 Reply Last reply
      4
      • F federico.massimi

        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

        JKSHJ Offline
        JKSHJ Offline
        JKSH
        Moderators
        wrote on last edited by
        #3

        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");

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        1 Reply Last reply
        7
        • F Offline
          F Offline
          federico.massimi
          wrote on last edited by
          #4

          @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?

          mrjjM 1 Reply Last reply
          0
          • F federico.massimi

            @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?

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @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;
            }
            
            1 Reply Last reply
            5

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved