author | zecke <zecke> | 2004-07-15 22:35:55 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-07-15 22:35:55 (UTC) |
commit | 422e7757feae169d8c931f2f0ac1d5acc201f846 (patch) (unidiff) | |
tree | 33e9493dcc04a1f6f2e251aa17d292d6b347e03a | |
parent | 652bde59f89394d8091b3ac53635059e52d9f8a0 (diff) | |
download | opie-422e7757feae169d8c931f2f0ac1d5acc201f846.zip opie-422e7757feae169d8c931f2f0ac1d5acc201f846.tar.gz opie-422e7757feae169d8c931f2f0ac1d5acc201f846.tar.bz2 |
When you've startet this application and the clicked
on its symbol you got a blank and unnamed widget.
This was the QMainWindow which was manually hidden, but then
raised by QPEApplication::raiseAppropriate. Now soleley use
QPEApplication::showMainWidget and execDialog for showing the widget
TODO: CleanUp more and use quicklaunc technology
-rw-r--r-- | noncore/apps/keyz-cfg/cfgdlg.cpp | 6 | ||||
-rw-r--r-- | noncore/apps/keyz-cfg/cfgdlg.h | 2 | ||||
-rw-r--r-- | noncore/apps/keyz-cfg/main.cpp | 12 |
3 files changed, 11 insertions, 9 deletions
diff --git a/noncore/apps/keyz-cfg/cfgdlg.cpp b/noncore/apps/keyz-cfg/cfgdlg.cpp index 863f21e..3965198 100644 --- a/noncore/apps/keyz-cfg/cfgdlg.cpp +++ b/noncore/apps/keyz-cfg/cfgdlg.cpp | |||
@@ -7,3 +7,5 @@ | |||
7 | 7 | ||
8 | CfgDlg::CfgDlg(QWidget* parent, CfgFile* cf, QApplication* app):QDialog(parent), cfile(cf), application(app) { | 8 | CfgDlg::CfgDlg(QWidget* parent, CfgFile* cf, QApplication* app, bool mod): |
9 | QDialog(parent, "CfgDlg", mod), cfile(cf), application(app) { | ||
10 | |||
9 | setCaption(tr("keyz configurator")); | 11 | setCaption(tr("keyz configurator")); |
@@ -29,3 +31,3 @@ CfgDlg::CfgDlg(QWidget* parent, CfgFile* cf, QApplication* app):QDialog(parent), | |||
29 | ap = new QSpinBox(0, 5000, 5, this); | 31 | ap = new QSpinBox(0, 5000, 5, this); |
30 | 32 | ||
31 | //QLabel* adms = new QLabel("ms", this); | 33 | //QLabel* adms = new QLabel("ms", this); |
diff --git a/noncore/apps/keyz-cfg/cfgdlg.h b/noncore/apps/keyz-cfg/cfgdlg.h index 16732ee..cbefdf1 100644 --- a/noncore/apps/keyz-cfg/cfgdlg.h +++ b/noncore/apps/keyz-cfg/cfgdlg.h | |||
@@ -16,3 +16,3 @@ Q_OBJECT | |||
16 | public: | 16 | public: |
17 | CfgDlg(QWidget* parent, CfgFile* cfile, QApplication *); | 17 | CfgDlg(QWidget* parent, CfgFile* cfile, QApplication *, bool b = false); |
18 | virtual ~CfgDlg(); | 18 | virtual ~CfgDlg(); |
diff --git a/noncore/apps/keyz-cfg/main.cpp b/noncore/apps/keyz-cfg/main.cpp index 55cc23e..4615562 100644 --- a/noncore/apps/keyz-cfg/main.cpp +++ b/noncore/apps/keyz-cfg/main.cpp | |||
@@ -2,2 +2,3 @@ | |||
2 | #include <qpe/qpeapplication.h> | 2 | #include <qpe/qpeapplication.h> |
3 | #include <qlayout.h> | ||
3 | #include <qmainwindow.h> | 4 | #include <qmainwindow.h> |
@@ -12,9 +13,8 @@ int main( int argc, char **argv ) { | |||
12 | 13 | ||
13 | QMainWindow m; | ||
14 | CfgDlg c(&m, &cfile, &app); | ||
15 | app.showMainWidget(&m); | ||
16 | m.hide(); | ||
17 | c.showMaximized(); | ||
18 | 14 | ||
19 | int ret = app.exec(); | 15 | CfgDlg c(0, &cfile, &app, true); |
16 | |||
17 | |||
18 | app.showMainWidget(&c); | ||
19 | int ret = QPEApplication::execDialog(&c); | ||
20 | 20 | ||