L'infobulle ne s'affiche pas
Bonsoir !
Voilà, j'ai un problème. Lors de l'éxécution de ce code, il n'y a pas de texte qui s'affiche dans la fenêtre.
Je lis pourtant cette excellente documentation ... qui ne dit rien sur cette erreur.
http://www.zetcode.com/tutorials/pyqt4/firstprograms/
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
#!/usr/bin/python
# -*- coding: iso-8859-15 -*-
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(100, 100, 500, 350)
self.setWindowTitle('Tooltip')
self.setToolTip('Putin de fenetre')
QtGui.QToolTip.setFont(QtGui.QFont('OldEnglish', 10))
app = QtGui.QApplication(sys.argv)
tooltip = Tooltip()
tooltip.show()
app.exec_() |
Merci d'avance,
Denis