C++ (Qt)while(!asleep()) sheep++;
C++ (Qt)void Dialog::setVisible( bool set ){ QDialog::setVisible( set ); if( set ) // dialog window now on screen}