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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -