[PyQt] Page of QStackedWidget showing up in QApplication.topLevelWidgets()

Grant Limberg glimberg at cedrus.com
Sat Dec 18 00:18:57 GMT 2010


Nevermind.  I was calling this too early in the creation of the window hierarchy and that was what was messing me up.

Grant Limberg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cedrus_masthead_logo.jpg
Type: image/jpeg
Size: 14398 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20101217/94309ae7/attachment-0001.jpg>
-------------- next part --------------


glimberg at cedrus.com
http://www.cedrus.com/



On Dec 17, 2010, at 3:43 PM, Grant Limberg wrote:

> On Dec 17, 2010, at 3:38 PM, Grant Limberg wrote:
> 
>> I'm having an issue in finding the top level widgets of my application.  When I call QApplication.topLevelWidgets(), one of the pages that I have in a QStackedWidget is showing up in the list of top level widgets.  Also, if I try to call parentWidget() on the page of the QStackedWidget showing up in the topLevelWidgets list, it returns None.  I've examined the code created by pyuic4 and everything seems in order.  
>> 
>> I attempted to make a minimal example showing the error but was unsuccessful.  Does anyone know what could possibly cause this behavior?
>> 
>> Thanks in advance,
>> 
>> Grant Limberg
>> <cedrus_masthead_logo.jpg>
>> 
>> glimberg at cedrus.com
>> http://www.cedrus.com/
> 
> I forgot to mention, that it also breaks the behavior of QWidget.isAncestorOf(), so I can't determine if any widgets inside this page of the QStackedWidget belong inside which QMainWindow instance.
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt



More information about the PyQt mailing list