tags:

views:

51

answers:

1

I remember when messing around with Qt seeing something where it was like

class MyForm : QDialog
{

}

Instead of

class MyForm
{
    void SetupUi(QDialog* dialog);
}

How do you generate the inherited form?

+1  A: 

It is the new and only way to setup your UI since Qt 4.0. Like it or not, you can always alter the generated code before building.

Here's an article on porting .ui files to Qt 4.x - http://qt.nokia.com/doc/4.0/porting4-designer.html.

Alex
You sure? I am positive when messing around with qmake that I got it to generate code like above. Thanks for the link though. I guess if all else fails, that technique it has it pretty nice and should work.
Actually that method is probably better. That way The generated code is separate and I wont have to constantly merge the generated code with my own code.