diff options
author | Vlad Pyatnichenko <partizanu3@gmail.com> | 2016-04-05 20:31:05 +0300 |
---|---|---|
committer | Vlad Pyatnichenko <partizanu3@gmail.com> | 2016-04-05 20:31:05 +0300 |
commit | 8eb993a7f81428b816d47887cd60139d1dfa7fff (patch) | |
tree | e1775fc6811a045bff8a9741a428d875012ea08e /README.md | |
parent | HOTFIX: use Q_Q instead of q_ptr directly. (diff) | |
download | singleapplication-8eb993a7f81428b816d47887cd60139d1dfa7fff.tar.xz |
Ensure backward compatibility and some cosmetic changes.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -39,11 +39,12 @@ The SingleApplication class implements a `showUp()` signal. You can bind to that Note that since `SingleApplication` extends the `QApplication` class you can do the following: ```cpp // Truly raise your window. -QObject::connect(&app, &SingleApplication::showUp, [&]{ - window.show(); - window.raise(); - window.activateWindow(); - }); // 'window' is your QWindow instance +QObject::connect(&app, &SingleApplication::showUp, [&] +{ + window.show(); + window.raise(); + window.activateWindow(); +}); // 'window' is your QWindow instance ``` Using `QApplication::instance()` is a neat way to get the `SingleApplication` instance at any place in your program. |