wigglywidget.h Example File widgets/wiggly/wigglywidget.h
#ifndef WIGGLYWIDGET_H
#define WIGGLYWIDGET_H
#include <QBasicTimer>
#include <QWidget>
class WigglyWidget : public QWidget
{
Q_OBJECT
public:
WigglyWidget(QWidget *parent = 0);
public slots:
void setText(const QString &newText) { text = newText; }
protected:
void paintEvent(QPaintEvent *event);
void timerEvent(QTimerEvent *event);
private:
QBasicTimer timer;
QString text;
int step;
};
#endif
Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) |
Trademarks |
Qt 4.6.0 |
|