[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: modifying Qt Designer generated code
From: "Aaron J. Seigo" <aseigo () kde ! org>
Date: 2006-07-20 18:30:03
Message-ID: 200607201230.03673.aseigo () kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
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)
[Attachment #5 (application/pgp-signature)]
>> 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