diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-07-15 13:29:31 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-07-17 14:14:56 +0000 |
commit | fdb8ef6507a556589425e7a109172952c03bfd22 (patch) | |
tree | 94ed3819df813c5d27971dc6e6bd4271f9cddb48 /examples/widgets/mainwindows/mainwindow/mainwindow.h | |
parent | 696ea2fff15cf0f8c1016353cfcb93d1f368129c (diff) |
Polish the widgets/mainwindows/sdi example.
- Introduce Qt 5 signals & slot syntax.
- Use QCommandLineParser to obtain file arguments, factor
out positioning into tile() function to be able to
use it from command line and open/new slots.
- Merge MainWindow::createMenus()/createQToolBars()
into MainWindow::createActions(), removing the need
to store the actions as member variables.
Use QMenu::addAction() for brevity.
- Use QIcon::fromTheme() to obtain system icons and use
resource icons as fallback.
- Rewrite settings code to use
QWidget::saveGeometry(), Widget::restoreGeometry() since
saving size and position does not work well with multiple
screens. Query the available size when determining
the initial size instead of using hard-coded values
for High-DPI screens.
- Fix minor issues in code, use multi-argument version
of QString::arg(), QDir::toNativeSeparators() to
present file paths to the user and and static method invocation.
- Fix snippet references accordingly.
Change-Id: I3ea0372bc7ff82247192f54620289352fb68d60f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'examples/widgets/mainwindows/mainwindow/mainwindow.h')
0 files changed, 0 insertions, 0 deletions