SkyzohKey
SkyzohKey

Reputation: 813

Custom System Tray Notification Qt

I'm searching from 3 days ago how to make a custom system tray message using Qt. I guess I'll have to make a class which extend from the balloon class but, how ?

I want to make something like that :

example
(source: elance.com)

Or also like the Skype Notification zone :

other example

Thanks for your future answers !

Upvotes: 6

Views: 2742

Answers (2)

fruitCoder
fruitCoder

Reputation: 77

You can use QSystemTrayIcon, show the message via the method showMessage()

Check this vid: https://www.youtube.com/watch?v=Fe1L6u064ao Although the guy speaks spanish I guess you can still follow how to do it (I could :-))

Upvotes: 1

Nejat
Nejat

Reputation: 32695

You can use QxtToolTip class in Qxt. It enables you to show any arbitrary widget as a tooltip. So i think you can create your custom widget and show it using QxtToolTip in the proper position. You can use this static function :

void QxtToolTip::show ( const QPoint & pos, QWidget * tooltip, QWidget * parent = 0, const QRect & rect = QRect() )   [static]

It can be like:

#include <QxtToolTip>

MyCustomWidget widget;
QPoint myPosition(x,y);
QxtToolTip::show ( &myPosition, &widget, parent);

Upvotes: 0

Related Questions