summaryrefslogtreecommitdiffstats
path: root/tests/auto/qapplication/modal/base.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qapplication/modal/base.cpp')
-rw-r--r--tests/auto/qapplication/modal/base.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/qapplication/modal/base.cpp b/tests/auto/qapplication/modal/base.cpp
new file mode 100644
index 0000000..d3a7de6
--- /dev/null
+++ b/tests/auto/qapplication/modal/base.cpp
@@ -0,0 +1,21 @@
+#include "base.h"
+
+base::base(QWidget *parent) :
+ QWidget(parent)
+{
+ m_timer = new QTimer(this);
+ m_modalStarted = false;
+ m_timer->setSingleShot(false);
+ connect(m_timer, SIGNAL(timeout()), this, SLOT(periodicTimer()));
+ m_timer->start(5000);
+}
+
+void base::periodicTimer()
+{
+ if(m_modalStarted)
+ exit(0);
+ m_modalDialog = new QDialog(this);
+ m_modalDialog->setModal(true);
+ m_modalDialog->show();
+ m_modalStarted = true;
+}