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. widget reappears only after dock resize
Qt 6.11 is out! See what's new in the release blog

widget reappears only after dock resize

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 376 Views
  • 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.
  • L Offline
    L Offline
    luminski
    wrote on last edited by
    #1

    Hi, I have a widget (QDialog) which is inside a QDockWidget. I make the dock aappear and it has the widget as expected, then i switch if off (using setVisible) and then back on. But then when it reappears, it does not have the widget as before. Then i resize the dock using a mouse and the widget magically shows up.

    Has anyone come across this behaviour ? sorry i didn't give many details, can gladly provide more if necessary.

    Regards

    jsulmJ 1 Reply Last reply
    0
    • L luminski

      Hi, I have a widget (QDialog) which is inside a QDockWidget. I make the dock aappear and it has the widget as expected, then i switch if off (using setVisible) and then back on. But then when it reappears, it does not have the widget as before. Then i resize the dock using a mouse and the widget magically shows up.

      Has anyone come across this behaviour ? sorry i didn't give many details, can gladly provide more if necessary.

      Regards

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

      @luminski said in widget reappears only after dock resize:

      QDialog

      Why do you use QDialog as widget for dock widget? QDialog is used for top level stand alone windows. Why don't you use QWidget instead?

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

      1 Reply Last reply
      1
      • L Offline
        L Offline
        luminski
        wrote on last edited by
        #3

        ok, thanks for replying and the tip. it's that I'm dealing with legacy code and working on qt stuff for the first time. I'll try to use QWidget instead of QDialog. I also found what was causing the issue. It was a call to QWidge::move, so marking it as 'solved'. Thanks!

        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