QMainWindow||QWidget problem?



  • Can't even describe it. How can i make QMainWindow ( QWidget, behavior of both same ) draw whole image? http://prntscr.com/9jgehl - as it shouldn't be.
    http://prntscr.com/9jgeu0 - as it should be, but without frame and black background
    P.S: x cord of window is -140 and Settings window are child or Another ( main ) QMainWindow


  • Qt Champions 2016

    Hi
    the second window is clipped to mainwindow. (normal for childs)
    So I think to avoid clipping, you should not set it as child.


  • Moderators

    There are couple of ways to do that:

    • as @mrjj suggested don't give it a parent and explicitly call show() on it. The downside is that without a parent you need to manually keep track of its lifetime (delete at some point).
    • give it a parent, derive from QDialog and call show() (or exec() if it's suppose to be modal).
    • give it a parent, set it a dialog flag and show it i.e.
    SomeWindow w = new SomeWindow(someParent);
    w->setWindowFlags(w->windowFlags() | Qt::Dialog);
    w->show();
    

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.