possible to convert string/numbers to tray icon?
i have tried the trolltech example that creates system tray but i havent been able to find a way to convert string or value to icon so i could create weather application that shows temperature in system tray. is this possible in qt or do i have to create own icon for each number?
this was possible at least in c#
http://blogs.msdn.com/abhinaba/archi...y-using-c.aspx
thanks.
1 Attachment(s)
Re: possible to convert string/numbers to tray icon?
Code:
TrayIco
::TrayIco( QWidget * parent, Qt
::WFlags f
) {
setupUi(this);
pixmap.fill(Qt::transparent);
string = "48";
painter.drawText(0,0,16,16,Qt::AlignHCenter | Qt::AlignVCenter, string);
ico
->setIcon
(QIcon(pixmap
));
ico->show();
}
Re: possible to convert string/numbers to tray icon?