Below 2 cases are working fine for me. 4.8 & windows.
#include "mainwindow.h"
#include <QApplication>
#include <QDialog>
int main(int argc, char *argv[])
{
MainWindow w;
w.show();
//You can use either of this
1. dai->setModal(true)
2. dai->setWindowModality(Qt::ApplicationModal);
dai->show();
return a.exec();
}
#include "mainwindow.h"
#include <QApplication>
#include <QDialog>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
QDialog* dai = new QDialog;
//You can use either of this
1. dai->setModal(true)
2. dai->setWindowModality(Qt::ApplicationModal);
dai->show();
return a.exec();
}
To copy to clipboard, switch view to plain text mode
Bookmarks