your class Frm must be a subclass of QWidget or pass 0 instead of this as the first parameter