c++ - Qt4 qwidget after shown event -


i need handle event fired after widget visible after show event. cannot find event in qt4. tried solutions suggested below. none of them worked.

my aim: working on embedded system , using qt ui. trying show hardware accelerated camera on ui after customwidget shown. if use showevent, camera shown before customwidget drawn. seems showevent fired before widget drawn. behaves before show event.

failure-1

bool customwidget::event(qevent *event) {    bool returnvalue = qwidget::event(event);    if (event->type() == qevent::polish)    {        this->camera->show();    }    return returnvalue; } 

polish event called once. when hide , show widget again , again, never fired.

failure-2

void customwidget::showevent(qshowevent *event) {     qwidget::showevent(event);     qtimer::singleshot(0, this, slot(dialogexec)); }  void customwidget::dialogexec() {     this->camera->show(); } 

this did not work either.

failure-3

void customwidget::paintevent( qpaintevent *event ) {    qwidget::paintevent( event );     if( !this->camera->isvisible() )    {        this->camera->show();    } }  void customwidget::hideevent( qhideevent *event ) {    this->camera->hide(); } 

qwidget has protected members called closeevent( qcloseevent* event ) , showevent( qshowevent* event ). maybe can use these methods manage camera.


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -