c++ - Qt- How to know about visibility of QDialog? -


is there anyway check visibility of specific qdialog? trying check this. here code:

messagedialog::messagedialog(qwidget *parent, int id, qstring name, qpixmap *photo) : qdialog(parent),   m_id(id),   m_name(name) {     // ...      if (messagedialog.isvisible())         qdebug()<<"visbile";     else         qdebug()<<"invisible";         } 

i'm getting error:

error: expected primary-expression before '.' token if (messagedialog.isvisible())

the problem trying call non-static function on messagedialog class. should call isvisible() function on dialog object, in case, should use this or call isvisible().

if ( this->isvisible() ) // if ( isvisible() )     qdebug()<<"visbile"; else     qdebug()<<"invisible"; 

but think won't either, because in constructor dialog not yet visible.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -