QPushButton with pixmap problem
Christopher Stone
chris.stone at gmail.com
Sat Jun 26 21:11:18 EDT 2004
The following short program written in PyQt does not display the q2
push button, does anyone know what I'm doing wrong?
#!/usr/bin/env python
import sys
from qt import *
class myQVBox(QVBox):
def __init__(self):
QVBox.__init__(self)
q1 = QPushButton("Quit 1", self)
q2 = QPushButton(QIconSet(QPixmap('mypix.png')),
"Quit 2", self)
app = QApplication(sys.argv)
main = myQVBox()
app.setMainWidget(main)
main.show()
sys.exit(app.exec_loop())
More information about the Python-list
mailing list