qt - Display not updating on the QTimer? -


trying display text based on when qtimer fires off...

mainwindow::mainwindow(qwidget *parent)     : qmainwindow(parent) {     m_label1 = new qlabel("my label not working", this);      qtimer* timerdisplay = new qtimer(this);     connect(timerdisplay, signal(started()), this, slot(updatedisplay(this)));     timerdisplay->start(10);  }   void updatedisplay(mainwindow* m_this) {     qstring out;     out = "hello";      m_this->m_label1->settext("asdf"); } 

connect(timerdisplay, signal(started()), this, slot(updatedisplay(this))); 

this statement failing. , you're ignoring message qt printing on console.

the problem is, can't pass variables in connect statements that. , for, way? can use this in updatedisplay method without need of passing in explicitely!


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -