[PyQt] .windId() returns sip.voidptr

Phil Thompson phil at riverbankcomputing.com
Tue Jan 24 14:17:58 GMT 2017

On 24 Jan 2017, at 2:10 pm, Sampsa Riikonen <sampsa.riikonen at iki.fi> wrote:
> Hi,
> When using python3 / PyQt5 combination, and calling widget's "winId" function, I get sip.voidptr (i.e. a general pointer to something).
> In python3 / PyQt4 it used to give the x-window id number, which could then be passed directly to the x-window system (this is useful for our custom streaming applilcations).
> How can I go from sip.voidptr to a plain integer (and I don't mean the memory address..).

Pass it to int().


More information about the PyQt mailing list