summaryrefslogtreecommitdiff
path: root/examples/widgets
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-09-02 12:34:31 +0200
committerAllan Sandfeld Jensen <allan.jensen@digia.com>2014-09-25 16:12:55 +0200
commitcc3875c2e463be5cf126a18637295a0c56358eda (patch)
tree41d513ec1c8726e51f017746774041a978bea107 /examples/widgets
parent568c26227d09b48fa6066f74d9dfa5d844073a5c (diff)
downloadqtbase-cc3875c2e463be5cf126a18637295a0c56358eda.tar.gz
Balloon tip must follow systemtray icon
If the a message notification is created at the same time as the system tray icon is embedded it may start at a wrong location, since the icon location it bases its own location is not yet final. This patch adds code to update the balloon tip location when the system tray icon is moved or resized. The bug and fix can be tested by the systray example by disabling the icon and letting show message trigger both showing it and the message. Change-Id: Ie1dc10489ad420e581e32afeb757c236fb5129ab Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'examples/widgets')
-rw-r--r--examples/widgets/desktop/systray/window.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/widgets/desktop/systray/window.cpp b/examples/widgets/desktop/systray/window.cpp
index 0ef5ddbd31..f13c05705e 100644
--- a/examples/widgets/desktop/systray/window.cpp
+++ b/examples/widgets/desktop/systray/window.cpp
@@ -144,6 +144,7 @@ void Window::iconActivated(QSystemTrayIcon::ActivationReason reason)
//! [5]
void Window::showMessage()
{
+ showIconCheckBox->setChecked(true);
QSystemTrayIcon::MessageIcon icon = QSystemTrayIcon::MessageIcon(
typeComboBox->itemData(typeComboBox->currentIndex()).toInt());
trayIcon->showMessage(titleEdit->text(), bodyEdit->toPlainText(), icon,