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. A working solution fo rQDialog restoreGeometry bugs?
Forum Updated to NodeBB v4.3 + New Features

A working solution fo rQDialog restoreGeometry bugs?

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 395 Views 1 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
    SamiV123
    wrote on last edited by SamiV123
    #1

    So some combination of recent X11 / Qt update (on Archlinux) broke QDialog::restoreGeometry functionality..

    The window (QDialog in this case) will resize properly but will not move to the proper location.

    Of course if I check the pos() it will happily LIE and report what I expect, except that it isn't correct.

    The workaround I've used so far is to create (about 100th such Qt bug workaround already) a singleShot timer and restoreGeometry on the timer event. The problem with this is of course that it's super ugly because the dialog opens at the center and then pops to another location creating garbage UX.

    Does anyone know a working fix here? Something like "create the window resources but don't show it, then restore the geometry and then when that actually worked then show it"

    Thanks

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

      Hi,

      Please give more details about "some combination of recent X11/Qt update". Otherwise it's just shots in the dark.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SamiV123
        wrote on last edited by
        #3

        Well, all I know is that it used to work, not sure which version has broken it. Currently I have Qt 5.15.14 and X.org 21.1.13.

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

          One thing you can do is retry with earlier version of Qt to find out if that's a Qt issue.
          If not, then go back with Xorg.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SamiV123
            wrote on last edited by SamiV123
            #5

            Nah, not going to waste time trouble shooting. That's just extra work without any benefit..

            So I did workaround the problem, seems using a QMainWindow can create a viable alternative (with some programming to recreate the (modal) dialog semantics)

            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