c++ - Qt app geometry width too big -
i nuked default window gui app , tried re-implement things maximize when dragging window top , dragging left , right take half screen.
the latter giving me problems, width of app not half screen more (like 100px more). height tho.
void mainwindow::mousereleaseevent(qmouseevent *event) { qpoint curpos = event->globalpos(); if (this->ui->labeltitle->undermouse()) //we grabbed top bar { if (curpos.x()<2) //x below 2px, left side of screen { this->setgeometry(qrect( qpoint(0,0), //top-left qsize( qapplication::desktop()->availablegeometry().right()/2, qapplication::desktop()->availablegeometry().bottom()))); } qwidget::mousereleaseevent(event); }
my screen res 1600x900 .right()
1599 , .right()/2
799 actual app width becomes 900 reason. failing?
the problem window minimum size policy set 900px.
Comments
Post a Comment