天道酬勤,学无止境

qtooltip

How to make QToolTip message persistent?

I want to make a qtooltip message persistent after I clicked the button. I plan to use qtimer to hide it by myself later, but the problem is as soon as I move mouse cursor away from the button rect, the message disappears, I want to make it stay there, until later I call hideText() from PyQt4 import QtGui, QtCore from functools import partial class MyDialog(QtGui.QDialog): def __init__(self, parent=None): super(MyDialog, self).__init__(parent) layout = QtGui.QVBoxLayout() btn = QtGui.QPushButton('Push Me') layout.addWidget(btn) self.setLayout(layout) btn.clicked.connect(partial(self

2021-08-11 00:15:10    分类:问答    python   qt   pyqt   pyqt4   qtooltip