Thanks for the quick response Justin.
First, I should mention that I am fairly new to this. With that said, here
is what im trying to do.
def doubleClickedItem(self):
"""for when an item is double clicked """
theListWidget = self.sender()
currentItem = theListWidget.currentItem()
currentItemText = currentItem.text()
currentItem.setBackground(QtGui.QColor('red'))
So, the idea is that I capture the sender item and changed its color to red
after is doublecliked. But all the documentation I can find is in c++ and
have not come across python examples. I am sure its prob very easy to port
those examples to python, however, i am still learning and currently
stumped by this.
On Tuesday, September 20, 2016 at 10:54:50 AM UTC+2, Juan Tigreros wrote:
>
> Hi everyone!
>
> Perhaps this is a simple question but I can seemed to succeed at googling
> it. Maybe someone here can help?
>
> I would like to change the text color of a text or background color if the
> item in a qlistwidget? I am double clicking on an item and will like to
> change the color of it, then change it back once i double clicked in
> another item in the list. Any ideas?
>
--
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/78f19fba-ce1b-4697-b768-e9d686c78b40%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.