[PyKDE] return value of app.exec_() ?
Dave S
eric3 at pusspaws.net
Sat Sep 30 17:14:38 BST 2006
Well porting my app from Linux QT3 to Windows QT4 is ... err.... interesting
Latest snag ...
qt4 designer; designed a pure QT4 login dialog with
login button - linked to - accept()
quit button - linked to close()
which in QT3 returns 0 or 1 from app.exec_loop() which I can use.
In QT4 app.exec_() it returns 0 no matter which I press. Googling I think it
is supposed to return different values but its all in C ! - can you clarify ?
Dave
PS can anyone tell me how to implement a QTable.setColumnStretchable() in QT4
QTableWidget ?
def LoginDialog1(self):
while True:
app = QtGui.QApplication(sys.argv)
login_dialog = QtGui.QDialog()
os.chdir(self.config.get('paths','dialogs')) # Use 'os.chdir'
else ui PNGs are lost
uic.loadUi('login.ui', login_dialog)
login_dialog.lineEdit_2.setEchoMode(QtGui.QLineEdit.Password)
login_dialog.show()
if app.exec_():
self.username = login_dialog.lineEdit_2.text()
password = login_dialog.lineEdit.text()
if password == '1111' and len(self.username) > 2:
break
else:
sys.exit()
More information about the PyQt
mailing list