Env
Problem
I have opened a second window in my application. It behaves as I want it to, except that if the MainWindow in the application moves, so does this window. That behavior is unwanted (actually more like "toxic and user-unfriendly").
The Qt docs say not to call move() from within moveEvent(), and anyway moveEvent() only shows up after window has stopped moving, not even while moving, which would, even if I did use it successfully, result in second window moving and snapping back, which would be pretty awful.
I thought to try overriding move() and not calling QDialog::move(), but that didn't work, it seems it cannot be overridden; rfview window still follows mainwindow around.
Perhaps I am opening the window wrong:
void MainWindow::xrfview()
{
ttrfview = new rfview(this);
uiframePlot = ttrfview->ui->framePlot;
ttrfview->show();
ttrfview->raise();
}
Or perhaps I have defined the window wrong:
class rfview: public QDialog
{
Q_OBJECT
public:
explicit rfview(QWidget *parent = 0);
~rfview();
}
Or both?
Basically, if the user drags/re-positions MainWindow, I do not want the rfview
window to follow.
Change ttrfview = new rfview(this)
to ttrfview = new rfview()