qt - QMainWindow::showMaximized() Doesn't Update Size -
i'm trying create qmainwindow
encapsulate qgraphicsview
i'm putting in it. want start out maximized, this:
qmainwindow *mainwindow = new qmainwindow(); mainwindow->setwindowstate(qt::windowmaximized); mainwindow->show(); qdebug() << mainwindow->size();
which says maximized window 200x100, incorrect.
am missing sort of update function? don't why wouldn't update size. i've tried using showmaximized()
same result.
edit
my end-goal use qmainwindow container qgraphicsview containing qgraphicsscene. on top of this, want have qwebview @ 50% width , 100% height, centered on everything.
so, need width , height in order coordinates , sizes correct.
well, effect of setwindowstate() not immediate, gets executed asynchronously. when window state changes, widget receives changeevent(), should reimplement or resizeevent() width() , height() after maximization takes place.
Comments
Post a Comment