Pyblish Starter Homework

Hi,

So I’m trying to do the homework section here http://pyblish.com/pyblish-starter/#homework
The first assignment is the easy one to make a loader tool tip.

I’m having a super hard time to actually get the tooltip to show up: Here’s my code:

def on_next():
        if not state["running"]:
            return on_finished()

        try:
            asset = next(assets)
        except StopIteration:
            return on_finished()

        has["assets"] = True

        item = QtWidgets.QListWidgetItem(asset["name"])
        item.setToolTip("asset info goes here")
        item.setData(QtCore.Qt.ItemIsEnabled, True)
        item.setData(AssetRole, asset)
        listing.addItem(item)

        lib.defer(25, on_next)

Is item.setToolTip(“asset info goes here”) not the way you would get a tooltip to appear?

Hi @mwessels, so sorry for the delay on this one; I usually get a notification but somehow must have missed this one.

To your question, good work getting started on the tool tip challenge! Can you share a link to where in the code you’re making edits? The repository can be found here: https://github.com/pyblish/pyblish-starter

And have you confirmed that the QListWidgetItem is able to carry a tooltip? The docs might have something about it. Have you tried creating a new widget, and making sure it isn’t someting related to Maya or Pyblish?

Hi @marcus. Since I posed this in April I have decided to learn to use Pyside and pyQt. I will make sure I thorougly know what I’m up to before venturing into pyblish.

I’m still very keen to use pyblish in our pipeline and I’m sure to visit the forum again with question! :slight_smile:

Cheers.

1 Like