In my code i tried to connect signal from QTrayIcon object and my form in such way:
connect(m_trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
this, SLOT(iconActivated(QSystemTrayIcon::ActivationReason)));
But i received a segfault on this code. Any ideas?
P.S. Sorry for my bad english.
Actually this can’t be the reason for the segfault, Qt does not segfault if a signal or a slot is not existant, it will give you conseole warnings when it happens to not find a signal and/or slot which you used.
So you should take a deeper look where the segfault comes from. Maybe, as allready pointed ou, m_trayIcon is not setup properly aka dangling pointer.
Example of QTrayIcon usage: http://qt.nokia.com/doc/4.6/desktop-systray.html