how to create QLineEdit.focusOutEvents?

Hans - G. Normann h.g.normann at gmx.de
Sat Sep 28 19:50:38 CEST 2002


Phil Thompson wrote:
> 
> Sub-class QLineEdit and re-implement focusOutEvent() in your sub-class.
> 

OK, nice to hear, but it is my first project. Normally im coding in Delphi. 
Who can give an very small example?

from qt import *

class Form1(QDialog):
    def __init__(self,parent = None,name = None,modal = 0,fl = 0):
        QDialog.__init__(self,parent,name,modal,fl)

        if name == None:
            self.setName('Form1')

        self.resize(216,77)
        self.setCaption(self.tr('Form1'))

        self.LineEdit1 = QLineEdit(self,'LineEdit1')
        self.LineEdit1.setGeometry(QRect(60,25,116,22))
        #this shoul hav an focusOutEvent



Hans




More information about the Python-list mailing list