[Qt-interest] Configure QtDesigner ui.h
Jos Collin
joscollin at gmail.com
Sat Sep 3 08:40:31 CEST 2011
So I cannot configure QtDesigner to use my dialog.cpp itself. Okay, but
there is another way of doing it. I can stop the ui designing (using
QtDesigner) at a certain point, copy all the code in dialog.ui.h to
dialog.cpp or a derived class of "dialog" and then edit and execute the code
from the command-line. But this prevents using QtDesigner again, later on.
On Fri, Sep 2, 2011 at 10:57 AM, Bo Thorsen <bo at fioniasoftware.dk> wrote:
> Den 02-09-2011 06:48, Jos Collin skrev:
> > Hello,
> >
> > How can I configure the QtDesigner to add the code to the dialog.cpp
> > file, instead of adding the code to dialog.ui.h file?
>
> You can't do that.
>
> > I don't think it
> > is a good practice to add the implementation code to a header file.
>
> Doesn't matter, if it's only included in the cpp file of the class using
> this. Just remember to make the ui a pointer in the class and do a "new
> MyUIThing" in the constructor. Don't let your class inherit the UI class.
>
> You are going to have to accept that this is just the way it is. Just
> like with templates, the implementation is in the .h file.
>
> Bo Thorsen,
> Fionia Software.
>
> --
>
> Expert Qt and C++ developer for hire
> Contact me if you need expert Qt help
> http://www.fioniasoftware.dk
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110903/d8eaf0ec/attachment.html
More information about the Qt-interest-old
mailing list