Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. QT6 progressbar -The running display effect of QT6 progressba is different
Forum Updated to NodeBB v4.3 + New Features

QT6 progressbar -The running display effect of QT6 progressba is different

Scheduled Pinned Locked Moved Unsolved Qt 6
9 Posts 5 Posters 695 Views 2 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.
  • Z Offline
    Z Offline
    zj4068
    wrote on last edited by zj4068
    #1

    old.png
    The picture above is the effect of progressbar on QT6.6.3 and QT5
    new.jpg
    The picture above is the effect of progressbar running in QT6.6.3 or above, but the displayed outer frame is gone, and the green progress display in the middle only becomes a line. I don’t know how to solve this running display problem on higher versions of QT6?

    Pl45m4P 1 Reply Last reply
    1
    • Z zj4068

      old.png
      The picture above is the effect of progressbar on QT6.6.3 and QT5
      new.jpg
      The picture above is the effect of progressbar running in QT6.6.3 or above, but the displayed outer frame is gone, and the green progress display in the middle only becomes a line. I don’t know how to solve this running display problem on higher versions of QT6?

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @zj4068

      It looks like you don't use any layout, so I suspect the progress bar to have its minimum size hint.
      What application style are you using? fusion? windows11? windowsvista?


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      0
      • Z Offline
        Z Offline
        zj4068
        wrote on last edited by
        #3

        I have tried win10 and win11, but nothing is the same. The same layout works fine in QT6.6.3 and below, but it will be like this in higher versions. I wonder if the progressbar has been upgraded in higher versions. Is this how the current version runs? But the display is different from before? It looks different and I'm not used to it.

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          It's the windows11 style progress bar.
          If you want to use the windowsvista style then pass it as parameter to your executable or hard-code it: https://doc.qt.io/qt-6/qstyle.html#details

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          Z 1 Reply Last reply
          1
          • Christian EhrlicherC Christian Ehrlicher

            It's the windows11 style progress bar.
            If you want to use the windowsvista style then pass it as parameter to your executable or hard-code it: https://doc.qt.io/qt-6/qstyle.html#details

            Z Offline
            Z Offline
            zj4068
            wrote on last edited by
            #5

            @Christian-Ehrlicher How to make progressbar use windows vista style? Is there any specific code?

            jsulmJ Christian EhrlicherC 2 Replies Last reply
            0
            • Z zj4068

              @Christian-Ehrlicher How to make progressbar use windows vista style? Is there any specific code?

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @zj4068 Check the documentation: https://doc.qt.io/qt-6/qapplication.html#setStyle

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • Z zj4068

                @Christian-Ehrlicher How to make progressbar use windows vista style? Is there any specific code?

                Christian EhrlicherC Offline
                Christian EhrlicherC Offline
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @zj4068 said in QT6 progressbar -The running display effect of QT6 progressba is different:

                How to make progressbar use windows vista style? Is there any specific code?

                So hard to click on my link and read three sentences?

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                1 Reply Last reply
                0
                • Z Offline
                  Z Offline
                  zj4068
                  wrote on last edited by
                  #8

                  #include <QStyleFactory>

                  int main(int argc, char *argv[]) {
                  QApplication app(argc, argv);
                  QApplication::setStyle(QStyleFactory::create("WindowsVista"));
                  return app.exec();
                  }

                  //set this style run ok in QT6.8.2

                  1 Reply Last reply
                  1
                  • S Offline
                    S Offline
                    SimonSchroeder
                    wrote on last edited by
                    #9

                    One advantage of Qt is that it has a native look on Windows on macOS. You might not like the choices Microsoft made, but in general it is a good idea to just adsorb the change. In the long run it will be less confusing to your users if you app (written in Qt) looks the same as every other app on Windows.

                    1 Reply Last reply
                    1

                    • Login

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