Re: the pop up location of dialog
I have a mainwindow opened, and one child dialog (QFileDialog::getOpenFileName) is opened from its sub-dialog. Since I have two monitors, each time, after I open the child dialog once in monitor1, then I drag the sub-dialog to monitor2, if I open the child dialog, it pops up in monitor1 still (mainwindow always stays in monitor1).
I am confused, I wrote the code (in sub-dialog class):
Code:
void sub-dialog::on_pushButton_load_clicked()
{
QString sFile
= QFileDialog::getOpenFileName(this, tr
("Open file"), sLoadDir, tr
("output (*.txt);;All files (*.*)") );
...
}
The location of pop up should be the same with its parent dialog, which here is the sub-dialog. Anything wrong?
Thanks in advance~
Added after 8 minutes:
Eventhough I move the mainwindow to monitor2, the pop up location is still in monitor1.
Re: the pop up location of dialog
I think this a bug from qt 4.5.2 (even qt 4.6.0). Example of qt has the same problem.
Re: the pop up location of dialog
Have you checked that you don't have some external software that repositions dialogs to a certain monitor? At least NVIDIA's Nview can do that.
Re: the pop up location of dialog
Quote:
Originally Posted by
joyer83
Have you checked that you don't have some external software that repositions dialogs to a certain monitor? At least NVIDIA's Nview can do that.
No, I didn't do any reposition.
This really depends on in which monitor I open the child dialog. It will stick to that monitor, no matter I move the mainwindow to the other monitor or the parent-dialog to the other monitor.