[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: modifying Qt Designer generated code
From:       Nasser <parallel.au () gmail ! com>
Date:       2006-07-22 0:33:12
Message-ID: d25049ac0607211733r7ea4cd76h69d314985e325b7e () mail ! gmail ! com
[Download RAW message or body]

what if i want to modify the ui file through Qt Designer?.. whenever i
modify the file, such as change a pushbutton's name, then can i
automatically get this updated through to the class i subclassed?..

or will i have to subclass the ui form once again?

.. because i want to modify the UI form using Qt Designer, but it
doesnt make sense if i then have to subclass it again in KDevelop...

the tutorial didnt seem to mention this anywhere



On 7/21/06, Aaron J. Seigo <aseigo@kde.org> wrote:
> On Thursday 20 July 2006 4:40, Ahmed Aït Mouss wrote:
> > Basically what you have to do is subclass the UI class created by
> > Designer and put any additionnal functionality in the subclass.
> > Say you create baseform.ui in Designer, then uic will generate
> > baseform.h and baseform.cpp. What you should do is create a class
> > named Form that inherits BaseForm, and add you functionnality to Form.
> > It's explained in the Qt docs.
>
> ... and in Qt4 you can simply use the uic generated code as a UI factory with
> setupUI() like this:
>
> MyWidget::MyWidget(QWidget* parent)
>   : QWidget(parent)
> {
>         Ui::ImageDialog ui;
>         ui.setupUi(this);
>         // my custom code
> }
>
> there is really no reason to ever modify the generated code directly. Nasser:
> what are you trying to achieve?
>
> --
> Aaron J. Seigo
> Undulate Your Wantonness
> GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43
>
> Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)
>
>
>
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
>
>
>
>
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic