There was a question like this a while back, and I think the conclusion was
that it is a bit more complicated:
https://groups.google.com/d/msg/python_inside_maya/Ti0KFJivDuQ/xIhVWF2DCgEJ




On Tue, Mar 11, 2014 at 6:39 AM, <[email protected]> wrote:

> Hello,
>
> I am currently trying to add QWidgets on to Maya's viewport so that we can
> effectively divide it into regions (probably going to use QFrames for the
> actual QWidget) however I am running into an issue with creating them.
>  Whenever I create a widget on the viewport it's background is black and
> none of the methods that I have tried for making the widget's background
> transparent have done anything.  The basic test case that I have been using
> is:
>
> import maya.OpenMayaUI as omui
> from PySide import QtCore
> from PySide import QtGui
> from shiboken import wrapInstance
>
> def maya_main_window():
>     main_window_ptr = omui.MQtUtil.mainWindow()
>     return wrapInstance(long(main_window_ptr), QtGui.QWidget)
>
> def active_view():
>     view = omui.M3dView.active3dView()
>     return wrapInstance(long(view.widget()), QtGui.QWidget)
>
> def add_QFrame():
>     frame = QtGui.QFrame(parent = active_view())
>     frame.setStyleSheet("background-color: transparent;");
>     frame.show()
>     return frame
>
> if __name__ == "__main__":
>     frame = add_QFrame()
>
> In addition to setting the style sheet I have tried:
> setAutoFillBackground(false);
>
>
> Thank you very much
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/1086d5c4-4194-4dfd-b69f-28d372046ba8%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1B-%2BLT_RnjUBes2KfyHNc4hYOAu2PB54J-nWGNeQMboA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to