c++ - Widget won't hide -
i guess silly question why doesn't widget hide after shown?
void dialog::on_tabwidget_selected(const qstring &arg1){ qwidget *w = new qwidget(); if(ui->tabwidget->currentindex() == 3){ w -> move(1093,278); w -> setwindowflags(qt::windowstaysontophint | qt::framelesswindowhint); w -> setfixedsize(206,206); w -> show(); }else{ w ->hide(); } }
the second time, creats new qwidget, hide not affect old widget if that's want do. maybe should explain little bit more result expected ?
edit: if want display popup when tab open, use widget's showevent , hideevent. or can remove "widget *w = new widget();", add "qwidget *w;" *.h, , add "w = new qwidget();" constructor, , should work.
Comments
Post a Comment