PDA

View Full Version : link QFrame subclass to ui



kenzou^
27th March 2012, 05:23
Hi all

im a newbie in Qt..i would like to ask about the ui and class.
I created the MainWindow form in the Creator. Then i put QFrame (let say frame1) in the MainWindow.
If i create Frame class in the header file, how do i link or connect this class to frame1 in the form?
Or in other word how do i make frame1 instantiate of Frame class?

Thanks

ChrisW67
27th March 2012, 06:30
You promote the QFrame in Designer/Qt Creator. Right-click on the frame1 entry in Designer and select Promote to...

kenzou^
27th March 2012, 09:53
ok i have successfully promote frame1 to class Frame.
but when i run the program no ui shown..but there are no error either..
if i remove the frame1 from ui then everything is ok.
what happened?

Added after 1 1:

ok it working now
thanks for your help ChrisW67