qt - Recursive repaint detected in popup window -


i have qpushbutton open new window on clicked.

void shownewwindow() {   popupwindow *popup = new popupwindow();   popup->show(); } 

and popupwindow declared following:

class popupwindow : public qwidget { q_object  public:   popupwindow(qwidget* parent);   void setcontent(qstring content) { this->content = content; }   qstring getcontent() { return content; } private:   qstring content; private slots:   void handlecontinue();   void handleruntoend(); 

};

then implement constructor:

popupwindow::popupwindow(qwidget *parent):qwidget(parent) {   qhboxlayout *hlayout = new qhboxlayout();   qwidget *buttonwidget = new qwidget();   qpushbutton *btncontinue = new qpushbutton();   btncontinue->settext("continue");   qpushbutton *btnrunend = new qpushbutton();   btnrunend->settext("run till completion");   buttonwidget->setlayout(hlayout);   hlayout->addwidget(btncontinue);   hlayout->addwidget(btnrunend);   connect(btncontinue,signal(clicked()), this, slot(handlecontinue()));   connect(btnrunend,signal(clicked()), this, slot(handleruntoend()));   qtextedit *html = new qtextedit();   html->setreadonly(true);   html->settext("aaaa");   qvboxlayout *layout = new qvboxlayout();   this->setlayout(layout);   layout->addwidget(html);   layout->addwidget(buttonwidget);  } 

my problem: whenever click on "continue" or "run till completion" buttons on popup window. app crashed. see error following:

qapplication: object event filter cannot in different thread.

qapplication: object event filter cannot in different thread.

qapplication: object event filter cannot in different thread.

qwidget::repaint: recursive repaint detected

please, me resolve this.


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -