Problem with QMessageBox and Windows 7
-
hi!
i have a problem with QMessageBox and Windows 7:
connect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(onActionAbout())); void MainWindow::onActionAbout() { QMessageBox::about(this, "About", qApp->applicationName() + ": Test.<br><br>" "Autore: " + QString(qApp->organizationName()).replace("_"," ") + "<br><br>" "Web site: <a href='" + qApp->organizationDomain() + "'>................it</a><br><br>" "Licenza: <a href='................'>Creative Commons</a><br><br>" "Linguaggio: C++/Qt<br><br>" "Versione: " + qApp->applicationVersion() + "<br><br>" "Versione Qt: " + QT_VERSION_STR); }
this code works on Linux and Windows 10, but not in Windows 7.
when I run this code in Windows 7, the program crashes.
do you know why? -
@jsulm said in Problem with QMessageBox and Windows 7:
@fermatqt Did you try to debug your app on Windows 7? To see where exactly it is crashing and to get stack trace.
unfortunately I do not have a car with which to install Windows 7 on QtCreator.
is there a way to debug without installing QtCreator? -
@jsulm said in Problem with QMessageBox and Windows 7:
@fermatqt It should work fine on Windows 7.
"when I run this code in Windows 7, the program crashes" - what exactly happens? Any error message?the program closes, and it appears the windows error "Programs Has Stopped Working".
-
Hi,
How did you deploy the application ?
-
Which version of Qt ?
-
What compiler are you using ?
-
Since the 5.9 betas are available, can you check them to see if you still encounter that problem ?
-
@SGaist said in Problem with QMessageBox and Windows 7:
Since the 5.9 betas are available, can you check them to see if you still encounter that problem ?
hi!
I also tried with Qt 5.9, but I have the same problem.
Even this code does not work:#ifndef SAVEDIALOG_H #define SAVEDIALOG_H #include <QObject> #include <QStringList> #include <QFileDialog> inline QString saveDialog() { QString fileName; QStringList filters; filters << "CSV(*.csv)" << "XLS(*.xls)" << "PDF(*.pdf)" << "All files(*.*)"; QFileDialog fd(0, QObject::tr("Salva"), QDir::homePath()); fd.setAcceptMode(QFileDialog::AcceptSave); fd.setNameFilters(filters); if (fd.exec() == QDialog::Accepted) { fileName = fd.selectedFiles()[0]; } return fileName; }