diff options
author | Arno <am@disconnect.de> | 2011-08-17 21:46:39 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2011-08-17 21:50:21 +0200 |
commit | 7195badbe2ff943d730f7d79ab183acec8ce26c3 (patch) | |
tree | 2618c13868496b2a87a54cf6659e2ea73198171b /smdialog.h | |
parent | 94e7da1400e59256f41f72b4592d4a9df1cca5a0 (diff) | |
download | SheMov-7195badbe2ff943d730f7d79ab183acec8ce26c3.tar.gz SheMov-7195badbe2ff943d730f7d79ab183acec8ce26c3.tar.bz2 SheMov-7195badbe2ff943d730f7d79ab183acec8ce26c3.zip |
Center Dialogs on screen
Since I'm now using a tiling window manager dialogs have to center
themselves on the screen. Otherwise they end up at QPoint(0,0). Not very
nice. Subclassed QDialog to SmDialog and converted all dialogs.
Diffstat (limited to 'smdialog.h')
-rw-r--r-- | smdialog.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/smdialog.h b/smdialog.h new file mode 100644 index 0000000..52081db --- /dev/null +++ b/smdialog.h @@ -0,0 +1,22 @@ +/* + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version + 2 of the License, or (at your option) any later version. +*/ + +#ifndef SMDIALOG_H +#define SMDIALOG_H + +#include <QDialog> + +class SmDialog : public QDialog { + Q_OBJECT + public: + explicit SmDialog(QWidget *parent = 0, Qt::WindowFlags f = 0); + + protected: + virtual void showEvent(QShowEvent *); +}; + +#endif // SMDIALOG_H |