I just want to keep the pyqt window stay on the top of maya, not all softwares on my mac
2012/3/28 Justin Israel <[email protected]> > Simple fix. Just pass a WindowFlag to your window that tells it to always > stay on top > > class MayaSubWindow(QtGui.QMainWindow): > def __init__(self, parent=getMayaWindow()): > super(MayaSubWindow, self).__init__(parent, > QtCore.Qt.WindowStaysOnTopHint) > QtGui.QPushButton(self) > > If you are saying that on other operating system, the window stays on top > by default (I havent checked or anything) then it could just be a > difference in the window systems defaults. > > > On Tue, Mar 27, 2012 at 8:56 AM, 宇 <[email protected]> wrote: > >> It's right to embed a pyqt window to Maya main window with this code >>> >>> import maya.OpenMayaUI as apiUI >>> >>> from PyQt4 import QtGui, QtCore >>> >>> import sip >>> >>> def getMayaWindow(): >>> >>> ptr = apiUI.MQtUtil.mainWindow() >>> >>> return sip.wrapinstance(long(ptr), QtCore.QObject) >>> >>> class MayaSubWindow(QtGui.QMainWindow): >>> >>> def __init__(self, parent=getMayaWindow()): >>> >>> super(MayaSubWindow, self).__init__(parent) >>> >>> QtGui.QPushButton(self) >>> >>> myWindow = MayaSubWindow() >>> >>> myWindow.show() >>> >> But, on Snow Leopard if you click the maya main window the pyqt ui will >> be covered by maya, Please give me a hand. >> >> -- >> view archives: http://groups.google.com/group/python_inside_maya >> change your subscription settings: >> http://groups.google.com/group/python_inside_maya/subscribe >> > > -- > view archives: http://groups.google.com/group/python_inside_maya > change your subscription settings: > http://groups.google.com/group/python_inside_maya/subscribe > -- http://thatboy.me -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe
