Well, your code worked for me too . So I tried to narrow down why mine didn't. The following code exhibit the same symptoms as my code (at least on my machine). I still have no idea what am I doing wrong.
#include <QApplication>
#include <QTextEdit>
#include <QTimer>
#include <QFont>
int main(int argc, char *argv[])
{
e.setCurrentFont(f);
e.setText("test foo bar");
e.showMaximized();
t.setInterval(150);
QObject::connect(&t,
SIGNAL(timeout
()),
&e,
SLOT(zoomIn
()));
t.start();
return app.exec();
}
#include <QApplication>
#include <QTextEdit>
#include <QTimer>
#include <QFont>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QTextEdit e;
QFont f("Arial", 14);
e.setCurrentFont(f);
e.setText("test foo bar");
e.showMaximized();
QTimer t;
t.setInterval(150);
QObject::connect(&t, SIGNAL(timeout()), &e, SLOT(zoomIn()));
t.start();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
Bookmarks