ah great!! just like css for html then. great Tip Justin . Thanks
by the way, nice tuts on cmivfx man. learned a lot from them. got to get that pyqt 4 maya one.
heard great things about it.

cheers
Ricardo





On 01/21/2013 11:32 PM, Justin Israel wrote:
Ah, cool.
And you could also add it all into a single parent widget like this:

self.someParentOfLabel.setStyleSheet("""
QLabel#aSpecificObjectName
{
    background-image:url('/image.png');
}
""")

... which helps to manage the styles all in one place, such as the main subclass.

-- justin


On Tue, Jan 22, 2013 at 12:28 PM, Ricardo Viana <[email protected] <mailto:[email protected]>> wrote:

    Got it working. just my stylesheet was wrong.

    self.label.setStyleSheet("background-image:url('/image.png')")


    not it works fine. thanks.




    On 01/21/2013 09:12 PM, Justin Israel wrote:
    One way if you are avoiding stylesheets is to set a QPixmap into
    a QLabel, and parent it to the widget (not in a layout). If the
    widget is resizeable, then you would have to implement the
    resizeEvent of the widget to also match the new size on the QLabel.

    What does your stylesheet code look like? Does it work as
    standalone code, and just not within Maya?


    On Tue, Jan 22, 2013 at 7:30 AM, Ricardo Viana
    <[email protected] <mailto:[email protected]>> wrote:

        Hi guys been looking for a way to put an image in the
        background of a pyqt widget in maya.
        i thought it would be easy but cant seem to find a way. tried
        with setStyleSheet but no sucess.
        also with qpixmap and also a fail. no image displayed. any
        thoughts?

-- ////////////////////////////////////
        Ricardo Viana
        VFX Generalist

-- You received this message because you are subscribed to the
        Google Groups "Python Programming for Autodesk Maya" group.
        To post to this group, send email to
        [email protected]
        <mailto:[email protected]>.
        To unsubscribe from this group, send email to
        [email protected]
        <mailto:python_inside_maya%[email protected]>.



-- You received this message because you are subscribed to the
    Google Groups "Python Programming for Autodesk Maya" group.
    To post to this group, send email to
    [email protected]
    <mailto:[email protected]>.
    To unsubscribe from this group, send email to
    [email protected]
    <mailto:[email protected]>.




-- ////////////////////////////////////
    Ricardo Viana
    VFX Generalist

-- You received this message because you are subscribed to the Google
    Groups "Python Programming for Autodesk Maya" group.
    To post to this group, send email to
    [email protected]
    <mailto:[email protected]>.
    To unsubscribe from this group, send email to
    [email protected]
    <mailto:python_inside_maya%[email protected]>.



--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].




--
////////////////////////////////////
Ricardo Viana
VFX Generalist

--
You received this message because you are subscribed to the Google Groups "Python 
Programming for Autodesk Maya" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].


Reply via email to