QSystemTrayIcon and Signals
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.
Code:
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?
Code:
connect(iconComboBox, SIGNAL(currentIndexChanged(int)),this, SLOT(setIcon(int)));
Thanks again!
Re: QSystemTrayIcon and Signals
You don't need any of those connections. If you want the tray icon to be visible then call setIcon() and show().