JediSpam
29th August 2011, 05:35
I'm having trouble understanding signals/slots while implementing QSystemTrayIcon. I have been going over the Signal/Slot documentation in Qt Doc as well as a nice example for QSystemTrayIcon available http://doc.qt.nokia.com/4.7/desktop-systray.html. I am creating a simple dialog and want my systemtrayicon to always be visible.
What am I going to want in place of "showIconCheckBox"? I don't need a checkbox because I want my condition to always be true. I understand the rest of the syntax of this line of code except this.
connect(showIconCheckBox, SIGNAL(toggled(bool)),trayIcon, SLOT(setVisible(bool)));
Likewise with this line. What am I going to want in place of iconComboBox? Do I even need anything?
connect(iconComboBox, SIGNAL(currentIndexChanged(int)),this, SLOT(setIcon(int)));
Thanks again!
What am I going to want in place of "showIconCheckBox"? I don't need a checkbox because I want my condition to always be true. I understand the rest of the syntax of this line of code except this.
connect(showIconCheckBox, SIGNAL(toggled(bool)),trayIcon, SLOT(setVisible(bool)));
Likewise with this line. What am I going to want in place of iconComboBox? Do I even need anything?
connect(iconComboBox, SIGNAL(currentIndexChanged(int)),this, SLOT(setIcon(int)));
Thanks again!