Hello!

In one of my applications, I want that some QWidgets with some labels appear in the desktop when a given signal is emitted, while this QWidgets should have the same functionality of the messages from a QSystemTrayIcon: if the user clicks on them, the widget dissapear. This all with a notice: I prefer not the create a QWidget subclass in a new .cpp and .hpp and .ui files; I'ld like to creates them inside the slot connected to the signal, if possible.

There are two questions I would like to do regarding this situation:

1º: how may I program the code in order for the tracking of the on click QMouseEvent to work, closing the QWidget? I know that, if I create a new class, I would just have to reimplement the mouseEvent(QMouseEvent*), but remember that I'ld like to do this directly by coding in the slot.
2º: in this same situation, how to add a smooth¹ event both when the widgets is appearing as well as when it dissapears after a click on it is made?


Thanks,

Momergil

¹: not sure if this is the appropriate word... By that I mean that the widget will not appear suddently on the screen, but gradually, like the messages from QSystemTrayIcon do.