Last change
on this file since 935 was 935, checked in by Dmitry A. Kuminov, 14 years ago |
tests: Added modal testcase.
|
File size:
612 bytes
|
Line | |
---|
1 | #include <QDebug>
|
---|
2 | #include <QtGui>
|
---|
3 |
|
---|
4 | class MyWidget : public QWidget
|
---|
5 | {
|
---|
6 | public:
|
---|
7 |
|
---|
8 | MyWidget(){}
|
---|
9 | virtual ~MyWidget() {}
|
---|
10 | };
|
---|
11 |
|
---|
12 | int main (int argc, char **argv)
|
---|
13 | {
|
---|
14 | QApplication app (argc, argv);
|
---|
15 | app.setQuitOnLastWindowClosed (true);
|
---|
16 |
|
---|
17 | MyWidget widget;
|
---|
18 | widget.resize (100, 100);
|
---|
19 | widget.show();
|
---|
20 |
|
---|
21 | QMessageBox *mb =
|
---|
22 | new QMessageBox (QMessageBox::Warning, "Title", "text",
|
---|
23 | QMessageBox::NoButton,
|
---|
24 | NULL, //&widget,
|
---|
25 | Qt::Dialog);
|
---|
26 | mb->show();
|
---|
27 |
|
---|
28 | return app.exec();
|
---|
29 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.