I see. I had a look at your example @Bay and I take it the widget will
display an image per pose, like a pose library.

In this case, if you really want to use a QListWidget, you can subclass
QListWidgetItem, append a “hover widget” and have that be transparent and
highlight whenever a mouse moves over it. That way, you have the original
widget showing the image, and another taking care of user feedback.

Alternatively, you can also use a QVBoxLayout and QWidget. Subclass the
QWidget and hover widget and stack that within your Layout.

This way, you get of all the performance benefits, whilst still being able
to control the look and feel through stylesheets. In this case, you can
name your overlay widget through setObjectName and access that using the
hash-tag.

To select all QWidgets with a child called “Hover”, you can do this:

QWidget #Hover {
    background-color: rgba(1, 1, 1, 0);}
QWidget #Hover:hover {
    background-color: rgba(1, 1, 1, 0.3);
}

The same goes for your QListWidgetItem:

QListWidgetItem #Hover {
    background-color: rgba(1, 1, 1, 0);}
QListWidgetItem #Hover:hover {
    background-color: rgba(1, 1, 1, 0.3);
}

​

-- 
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/CAFRtmODLa5jpOJdgt7TAPVmxh%2B4iQMgvtyV8iuvnPQu%2BFeu14A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to