Answer the question
In order to leave comments, you need to log in
The problem is with the QWidget class. How to set up PyQ4t to work properly?
Generally does not display the widget's context tooltip based on the QWidget class.
#!/usr/bin/python
# tooltip.py
import sys
from PyQt4 import QtGui
from PyQt4 import QtCore
class Tooltip(QtGui.QWidget):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
self.setGeometry(300, 300, 250, 150)
self.setWindowTitle('Tooltip')
self.setToolTip('This is a <b>QWidget</b> widget')
QtGui.QToolTip.setFont(QtGui.QFont('OldEnglish', 10))
app = QtGui.QApplication(sys.argv)
tooltip = Tooltip()
tooltip.show()
app.exec_()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question