after a few hours of playing around, I manage to make it work, problem is it has to be done after the mainwindow is painted, with a timer i used the following code
void MainWindow::timer()
{
QRect myrec
= myview
->geometry
();
QRect myrec2
= myview
->frameGeometry
();
int y1 = myrec.y();
int x1 = myrec.x();
int x2 = myrec2.x();
int y2 = myrec2.y();
mydialog->move(x1-x2,y1-y2);
}
void MainWindow::timer()
{
QRect myrec = myview->geometry();
QRect myrec2 = myview->frameGeometry();
int y1 = myrec.y();
int x1 = myrec.x();
int x2 = myrec2.x();
int y2 = myrec2.y();
mydialog->move(x1-x2,y1-y2);
}
To copy to clipboard, switch view to plain text mode
Bookmarks