Hi all,
first of all: my english is not good, so sorry for this....
I have a strange problem with al little test that I am writing following:
#include <QApplication>
#include <QProgressDialog>
int main(int argc, char* argv[])
{
dlg.setRange(0, 0);
dlg.show();
// I want to simulate a process that takes a long time
for (int i = 0; i < 1000000; i++)
{
qDebug() << i;
// Call process event to have a GUI responsivity
}
dlg.hide();
return app.exec();
}
#include <QApplication>
#include <QProgressDialog>
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
QProgressDialog dlg;
dlg.setRange(0, 0);
dlg.show();
// I want to simulate a process that takes a long time
for (int i = 0; i < 1000000; i++)
{
qDebug() << i;
// Call process event to have a GUI responsivity
QCoreApplication::processEvents();
}
dlg.hide();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
The program behaves as it should, but....if i click on ProgressDialog WindowBar (when lives close buttons :-) ) the loop counter freezes but the progress animation NOT! It 'a bit annoying.
I'm something wrong? I can do something to prevent this behavior?
I tried to intercept mouse events...
I tried this test on Mac.
Bookmarks