MikeG
29th May 2009, 15:32
OS: Ubuntu 8.10 w/ partial upgrade to 9.04
Qt Version: 4.5.1 Qt Creator: 1.1.0
When calling fDialog.getOpenFileName, QMessageBox no longer obeys where you tell it to move to. For instance, being a parent of the Terminal window, it will not center. Calling msgBox.move(x,y) does not move the QMessageBox. It always starts in the same awkward place. If fDialog.getOpenFileName is not called, the QMessageBox moves whereever is needed.
void Terminal::on_actionOpen_triggered()
{
QFileDialog fDialog;
QString fileName = fDialog.getOpenFileName(this, tr("Open File"), "app/", tr("All Files (*)"), 0, 0);
if (fileName == "") {
QMessageBox msgBox(QMessageBox::Information, QApplication::applicationName(), tr("Open operation canceled."), QMessageBox::Close, this, 0);
msgBox.exec();
return;
}
Qt Version: 4.5.1 Qt Creator: 1.1.0
When calling fDialog.getOpenFileName, QMessageBox no longer obeys where you tell it to move to. For instance, being a parent of the Terminal window, it will not center. Calling msgBox.move(x,y) does not move the QMessageBox. It always starts in the same awkward place. If fDialog.getOpenFileName is not called, the QMessageBox moves whereever is needed.
void Terminal::on_actionOpen_triggered()
{
QFileDialog fDialog;
QString fileName = fDialog.getOpenFileName(this, tr("Open File"), "app/", tr("All Files (*)"), 0, 0);
if (fileName == "") {
QMessageBox msgBox(QMessageBox::Information, QApplication::applicationName(), tr("Open operation canceled."), QMessageBox::Close, this, 0);
msgBox.exec();
return;
}