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();
}
TrayIco::TrayIco( QWidget * parent, Qt::WFlags f)
: QMainWindow(parent, f)
{
setupUi(this);
QPixmap pixmap(16,16);
pixmap.fill(Qt::transparent);
QPainter painter(&pixmap);
QString string;
string = "48";
painter.drawText(0,0,16,16,Qt::AlignHCenter | Qt::AlignVCenter, string);
ico = new QSystemTrayIcon(this);
ico->setIcon(QIcon(pixmap));
ico->show();
}
To copy to clipboard, switch view to plain text mode
Bookmarks