Qt
3
Вклад в тег
QRect QSystemTrayIcon::geometry () const
void QObject::timerEvent ( QTimerEvent * event ) [virtual protected]
#include <QSystemTrayIcon>
class MySystemTrayIcon : public QSystemTrayIcon, QWidget
{
Q_OBJECT
public:
MySystemTrayIcon(QObject *parent = 0);
protected:
void timerEvent(QTimerEvent *event);
};
MySystemTrayIcon::MySystemTrayIcon(QObject *parent)
: QSystemTrayIcon(parent), QWidget(0)
{
startTimer(1000); // 1-second timer
}
void MySystemTrayIcon::timerEvent(QTimerEvent *event)
{
QWidget::setGeometry (QSystemTrayIcon::geometry());
}