qmouseevent

How to enable mouse tracking on a QLabel that has RichText

How to enable mouse tracking on a QLabel that has RichText Question: I really want a single QLabel to have different colours for different parts of the string. Past questions have led me to the solution of using HTML4 rich text options within it, for example: ‘<font color="red">I’m red! </font><font color="blue">I’m blue!</font>’ This solution works …

Total answers: 1

PyQt mousePressEvent – get object that was clicked on?

PyQt mousePressEvent – get object that was clicked on? Question: I’m using PyQt and PyQtGraph to build a relatively simple plotting UI. As part of this I have a graphicsview (pyqtgraph’s graphicslayoutwidget) that has PlotItems dynamically added to it by the user. What I’m trying to achieve is allowing the user to select a PlotItem …

Total answers: 3