Sorry for the first message. I did not finish my mail.<br><br>So, The code below is supposed to draw 2 labels in a grid.<br>For me the 2 labels are painted at the same place when I run the code !!<br>Why this superposition ?
<br><br>Simon<br><br>import sys<br>from PyQt4 import QtGui, QtCore<br><br>class MainWindow(QtGui.QMainWindow):<br><br> def __init__(self, *args):<br> QtGui.QMainWindow.__init__(self)<br> self.setWindowTitle
("DE")<br> self.gridlayout = QtGui.QGridLayout()<br> self.gridlayout.setMargin(9)<br> self.gridlayout.setSpacing(6)<br> self.gridlayout.setObjectName("gridlayout")<br>
self.gridlayout.addWidget(QtGui.QLabel("foo",self),0,1)<br> self.gridlayout.addWidget(QtGui.QLabel("fAn",self),0,2)<br><br>def main(args):<br> app=QtGui.QApplication(args)<br> win=MainWindow()
<br> win.show()<br> app.connect(app, QtCore.SIGNAL("lastWindowClosed()")<br> , app<br> , QtCore.SLOT("quit()")<br> )
<br> sys.exit(app.exec_())<br><br>if __name__=="__main__":<br> main(sys.argv)