diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-07-15 13:12:24 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-07-20 22:07:13 +0000 |
commit | bdbd26a3b73b718b54eb9ffb2ebf687924ed6e6d (patch) | |
tree | 5235cd2e316cb4e62e1772f9bcf156ec9a09068b /examples/widgets/mainwindows/application | |
parent | c4a97def7b68586bf6067f4e197fb715c2136ecb (diff) |
Polish the widgets/mainwindows/mdi example.
- Introduce Qt 5 signals & slot syntax and remove the QSignalMapper
used to map the triggered() signals of the per-MDI-child actions
of the window menu to the activation slot by a functor to demonstrate
the flexibility of the new connection syntax (the functor can
in turn be replaced by a lambda expression once we have C++ 11).
- 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 static method invocation.
Change-Id: I3d5078ddbe3cb4eba65e188430ba3580cecb2c79
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'examples/widgets/mainwindows/application')
0 files changed, 0 insertions, 0 deletions