i will grab it for sure. thanks mate.

On 01/22/2013 12:39 AM, Justin Israel wrote:
Ya, just the same as normal css! You can use class names or ids. Here are the selectors:
http://doc.qt.digia.com/qt/stylesheet-syntax.html
I've even done stuff where I just store it in an actual style.css, and read it into setStyleSheet() on the main window at runtime.

Thanks for the compliment. I'm really happy with the pyqt tutorial. It ended up being pretty long and I move a bit fast in order to get more information packed into it.

Let me know how you like it, if you end up grabbing it.


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

    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]
    <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