(Python 2.5, Windows Vista, Qt4)
Код программы:
import sys
from PyQt4 import Qt
class Window(Qt.QMainWindow) :
def __init__(self, parent=None) :
Qt.QMainWindow.__init__(self, parent)
wg = Qt.QWidget()
line = Qt.QLineEdit()
layout = Qt.QVBoxLayout()
layout.addWidget(line)
wg.setLayout(layout)
self.setCentralWidget(wg)
app = Qt.QApplication(sys.argv)
w = Window()
w.show()
app.exec_()