Last active
September 5, 2017 15:04
-
-
Save SEVEZ/014666eb3f27cd88afe8 to your computer and use it in GitHub Desktop.
PyQT4 to PySide conversion #misc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PyQt | |
from PyQt4 import QtCore, QtGui | |
import sip | |
long(sip.unwrapinstance( obj )) | |
sip.wrapinstance(long(ptr), QtCore.QObject) | |
sip.wrapinstance(long( OpenMayaUI.MQtUtil.mainWindow() ), QtCore.QObject ) | |
# PySide | |
from PySide import QtGui, QtCore | |
import shiboken | |
long(shiboken.getCppPointer( obj )[0]) | |
shiboken.wrapinstance(long(ptr), QtCore.QObject) | |
shiboken.wrapInstance(long( OpenMayaUI.MQtUtil.mainWindow() ), QtGui.QWidget ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment