Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

widget reappears only after dock resize



  • 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


  • Qt Champions 2019

    @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?



  • 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!


Log in to reply