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. how to move the cancel button in QProgressDialog?
Forum Updated to NodeBB v4.3 + New Features

how to move the cancel button in QProgressDialog?

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 524 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.
  • D Offline
    D Offline
    davecotter
    wrote on last edited by
    #1

    my progress dialog looks like this:

    cancel.png
    no matter what i try, i can not seem to get that darn'd cancel button to move. how can i move it down so the dialog looks more elegantly laid out?

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

      Hi
      Is there a stylesheet on it?

      You could use FindChild to get a pointer to it and use move() but
      I wonder if it's in a layout and hence that would never work.

      You could use
      https://doc.qt.io/qt-5/qobject.html#dumpObjectTree
      and see if its in a layout.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        davecotter
        wrote on last edited by
        #3

        that was the first thing i tried. calling move does nothing because there is a private layout that ignores where you manually put things

        mrjjM 1 Reply Last reply
        0
        • D davecotter

          that was the first thing i tried. calling move does nothing because there is a private layout that ignores where you manually put things

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

          @davecotter
          Ok. If you apply no stylesheet is the button then aligned better?
          I wonder if it adds some sort of spacing since the layout should
          align them to the right and its an odd space after the button.

          1 Reply Last reply
          0
          • D Offline
            D Offline
            davecotter
            wrote on last edited by
            #5

            If I apply no stylesheet, then it uses a standard macOS progress bar which is much thinner vertically so the spacing looks better. I would expect the spacing due to the layout to compensate for the vertical size when I change it using the style sheet.

            1 Reply Last reply
            0

            • Login

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