Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 17158

How to get WinID handle as pointer in pyside6

$
0
0

In pyqt, one can access wid as sip.voidptr, using widget.winId(), and then turn it to capsule object using wid.ascapsule()

In pyside6, when using widget.winId(), I can only get an int number.

How can I get winId() as ptr like pyqt when using pyside6?

I need ptr as capsule because the api I use give the following error:

return WNT_Window(ctypes.c_void_p(wid))           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:    1. OCP.WNT.WNT_Window(theTitle: str, theClass: OCP.WNT.WNT_WClass, theStyle: int, thePxLeft: int, thePxTop: int, thePxWidth: int, thePxHeight: int, theBackColor: OCP.Quantity.Quantity_NameOfColor = <Quantity_NameOfColor.Quantity_NOC_MATRAGRAY: 2>, theParent: capsule = None, theMenu: capsule = None, theClientStruct: capsule = None)    2. OCP.WNT.WNT_Window(theHandle: capsule, theBackColor: OCP.Quantity.Quantity_NameOfColor = <Quantity_NameOfColor.Quantity_NOC_MATRAGRAY: 2>)

Viewing all articles
Browse latest Browse all 17158

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>