When Clicking Combobox The Whole Window Is Moved to That Location
Unsolved
General and Desktop
-
I have a few qt combo boxes in my program as well as code that lets me move the window, but for some reason when I click my combo boxes it moves my window, this is what it looks like as it totally moves the screen.
The code for my mouse event is here
void MainWindow::mousePressEvent(QMouseEvent *event) { QGroupBox *child = static_cast<QGroupBox*>(childAt(event->pos())); if (child!=ui->groupBox) //mTitlebar is the QLabel on which we want to implement window drag { return; } isMousePressed = true; startPos = event->pos(); }
Im assuming it is something messing up in here, do you all have any idea? Thank you in advance!
-
@Laner107 said in When Clicking Combobox The Whole Window Is Moved to That Location:
if (child!=ui->groupBox)
Shouldn't it be
if (child == ui->groupBox)