[PyQt] negative index "setWidget" not working as expected

Phil Thompson phil at riverbankcomputing.com
Thu Jul 28 11:42:27 BST 2011


On Thu, 28 Jul 2011 11:59:53 +0200, Sebastian Elsner
<sebastianelsner at freenet.de> wrote:
> Hallo,
> 
> inserting widgets with a negative index does not work as expected. I was

> expecting -1 to add a widget to the end and -2 to insert it right before

> the last widget in the layout. Is my assumption wrong?

Yes. That's a Python convention, not a Qt/C++ convention.

Phil


More information about the PyQt mailing list