Solved 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 -
Hi
the second window is clipped to mainwindow. (normal for childs)
So I think to avoid clipping, you should not set it as child. -
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()
(orexec()
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();
- as @mrjj suggested don't give it a parent and explicitly call