Hi everyone,
I try to set the interval of a timer to fire it's event via a QInputDialog so the user has some control over the number of notifications he/she gets.
|
Source code
|
1
2
3
4
5
6
|
bool ok;
int interval = QInputDialog::getInteger(this, "Set Interval Of Messages", "Enter the number of notifications you would like to receive in a day", 1, 1, 10, 1, &ok);
if(ok)
timer->setInterval(timer->interval() + 1000);
|
after this code runs, the inputdialog closes and so does the application!
"this" is a QWidget containing a QSystemTrayIcon.
i hope anyone can help me!
thanks