#include #include int main(int argc, char *argv[]) { QApplication app(argc, argv); QWidget w; w.setLayout(new QVBoxLayout()); QLabel *ttl = new QLabel("Hover me", &w); ttl->setToolTip("This is a test."); w.layout()->addWidget(ttl); QLabel *l = new QLabel("L", &w); l->setAlignment(Qt::AlignCenter); l->resize(100, 100); QFont fnt; fnt.setPointSize(24); l->setFont(fnt); w.layout()->addWidget(l); QPropertyAnimation *a = new QPropertyAnimation(l, "size"); a->setDuration(10000); a->setStartValue(QSize(100, 30)); a->setEndValue(QSize(30, 100)); a->setLoopCount(-1); w.resize(150, 150); w.show(); a->start(); return app.exec(); }