QWidget::isVisible() not working on linux
-
when I test fWidget->isVisible() in centos , It always returns false even if the fWidget is shown . While I use !fWidget->isHidden(); it works . What's the problem ? anyone knows the reason and meets the same problem before ? thanks ~~
-
Is this a top-level widget?
-
no , it is not top-level widget . But I am sure it is shown . Actually it is a QGLWidget() , and I draw a lot of models inside it .
-
Can you give us a small example which reproduce the problem?
@
inline bool QWidget::isVisible() const
{ return testAttribute(Qt::WA_WState_Visible); }inline bool QWidget::isHidden() const
{ return testAttribute(Qt::WA_WState_Hidden); }
@ -
thank you , guys , but I can't give a example , because this is what I met in our current project , the
project is very large . I wonder whether this is because the fWidget is not a window , it is the child of some widget , I tested using isVisble on the child of visible widgets , it can work . so It is really strange why it can not work here . -
The infomation you provited is too limited, so I think other people cannot give you some useful hint.
If you are unsure whether it related to something,you can write a small program to test it.
-
thank you , MR 2 , I have tested it with the small program , but didn't find any strange result . So thank you again , Mr 2 , just ignore this .