Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

Resize a Boarderless QMainWindow

$
0
0
Hello everyone, I’m trying to resize and move a boarderless qmainwindow. I have used qt am stuck on this. If someone can walk me though this it would be great. I currenly have it moveing but not resizing. Here is my code: void mainTrackbox::mousePressEvent(QMouseEvent *event){     offset = event->pos(); }   void mainTrackbox::mouseMoveEvent(QMouseEvent *event) {     if (event->buttons() && Qt::LeftButton) {                         QPoint diff = event->pos() - offset;         QPoint newpos = this->pos() + diff;         this->move(newpos); }   }   void mainTrackbox::mouseReleaseEvent(QMouseEvent *event) {     offset = QPoint(); }

Viewing all articles
Browse latest Browse all 13965

Trending Articles