[PyQt] QStackedLayout addWidget always returns 0

Phil Thompson phil at riverbankcomputing.com
Thu Nov 27 11:21:12 GMT 2014


On 27/11/2014 1:07 am, Lee Harr wrote:
>> My understanding is that QStackedLayout.addWidget should add the
>> widget to the end of the stack and return the index of the position at
>> which it was added.
> 
> 
> Here is the relevant documentation I am reading:
> http://pyqt.sourceforge.net/Docs/PyQt4/qstackedlayout.html#addWidget
> 
> 
>> For some reason, I am always getting 0...
>> 
>> Versions:
>> Ubuntu 4.10
>> Python 3.4.2 (default, Oct  8 2014, 13:18:07) [GCC 4.9.1]
>> PyQt 4.11.2
> 
> Sorry, should be Ubuntu 14.10
> 
> 
> Is anyone else able to see this same behavior?
> Am I misreading the docs?
> 
> I have googled, but I do not see where to report PyQt bugs.

Should be fixed in tonight's PyQt4 and PyQt5 snapshots.

Thanks,
Phil


More information about the PyQt mailing list