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. QDial pointer mismatch
Forum Updated to NodeBB v4.3 + New Features

QDial pointer mismatch

Scheduled Pinned Locked Moved Solved General and Desktop
qt5.14qt5.7
9 Posts 3 Posters 1.4k 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.
  • S Offline
    S Offline
    sayan275
    wrote on last edited by sayan275
    #1

    Hi,
    Issue in Qt 5.14, but working fine in Qt 5.7 with same code.
    While using QDial, the pointer is changing while running our application. See the image
    29c72e82-07a2-4922-97f7-b03857c87f6d-image.png
    The green marked are in our project where I have added QDial in a qwidget class and added that widget in a dockwidget.
    In the form preview the pointer is round, but in the output pointer is different.
    Not able to understand, maybe because of the stylesheet in our application or something else?
    Any suggestion is appreciated.
    In another separate app(QMainwindow - red mark), the output is proper.

    output in Qt 5.7
    51f3aad5-9847-4aa4-a517-c8924200a35e-image.png

    Regards,
    Sayan

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

      Hi
      I think its related to platform styles and fusion
      and perhaps the app load other style on start.

      like
      QApplication::setStyle(QStyleFactory::create("Fusion"));

      S 2 Replies Last reply
      1
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi
        So in Design it looks like this
        alt text

        but when you run it looks like
        alt text

        or what do yo u mean by " the pointer is changing while running our application"

        S 1 Reply Last reply
        1
        • mrjjM mrjj

          Hi
          So in Design it looks like this
          alt text

          but when you run it looks like
          alt text

          or what do yo u mean by " the pointer is changing while running our application"

          S Offline
          S Offline
          sayan275
          wrote on last edited by
          #3

          @mrjj no...just the opposite.
          "or what do yo u mean by " the pointer is changing while running our application"" - Yes.

          The strange part is , if I try an example with QMainwindow app and add QDial and run it...the output correct as marked with the red arrow.
          But in our code base, in Designer the value-pointer is round, but on running the app it turns to be arrow. This is happening in 5.14.
          But the same code base in 5.7, it's fine,ie the pointer is round as in the last image, ie Dialog with ROI width n height.

          Regards,
          Sayan

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

            Hi
            I think its related to platform styles and fusion
            and perhaps the app load other style on start.

            like
            QApplication::setStyle(QStyleFactory::create("Fusion"));

            S 2 Replies Last reply
            1
            • mrjjM mrjj

              Hi
              I think its related to platform styles and fusion
              and perhaps the app load other style on start.

              like
              QApplication::setStyle(QStyleFactory::create("Fusion"));

              S Offline
              S Offline
              sayan275
              wrote on last edited by
              #5

              @mrjj but why it's correct in Qt 5.7, with the same code
              tempsnip.png

              J.HilkJ 1 Reply Last reply
              0
              • S sayan275

                @mrjj but why it's correct in Qt 5.7, with the same code
                tempsnip.png

                J.HilkJ Offline
                J.HilkJ Offline
                J.Hilk
                Moderators
                wrote on last edited by
                #6

                @sayan275 update to 14.2, there was a bug with stylesheet cascading in 5.7+ should be fixed in the latest LTS 5.12 and 5.14.2


                Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                Q: What's that?
                A: It's blue light.
                Q: What does it do?
                A: It turns blue.

                S 2 Replies Last reply
                2
                • J.HilkJ J.Hilk

                  @sayan275 update to 14.2, there was a bug with stylesheet cascading in 5.7+ should be fixed in the latest LTS 5.12 and 5.14.2

                  S Offline
                  S Offline
                  sayan275
                  wrote on last edited by
                  #7

                  @J-Hilk yes sure I'll try 5.14.2

                  1 Reply Last reply
                  0
                  • J.HilkJ J.Hilk

                    @sayan275 update to 14.2, there was a bug with stylesheet cascading in 5.7+ should be fixed in the latest LTS 5.12 and 5.14.2

                    S Offline
                    S Offline
                    sayan275
                    wrote on last edited by
                    #8

                    @J-Hilk I tried with qt5.14.2, but it's the same.

                    1 Reply Last reply
                    0
                    • mrjjM mrjj

                      Hi
                      I think its related to platform styles and fusion
                      and perhaps the app load other style on start.

                      like
                      QApplication::setStyle(QStyleFactory::create("Fusion"));

                      S Offline
                      S Offline
                      sayan275
                      wrote on last edited by
                      #9

                      @mrjj

                      I tried the above in main and it worked.

                      #include <QStyleFactory>
                      ...
                      QApplication a(argc, argv);
                      a.setStyle(QStyleFactory::create("Fusion"));
                      ...
                      

                      Thanks and sorry for late reply.

                      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