From kde-devel Sat Jul 22 07:23:11 2006 From: Thomas Baumgart Date: Sat, 22 Jul 2006 07:23:11 +0000 To: kde-devel Subject: Re: modifying Qt Designer generated code Message-Id: <200607220923.17777 () net-bembel ! de> X-MARC-Message: https://marc.info/?l=kde-devel&m=115355304810525 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============1216597997==" --===============1216597997== Content-Type: multipart/signed; boundary="nextPart11334500.de4roPbYzg"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart11334500.de4roPbYzg Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi all, on Saturday 22 July 2006 02:33, Nasser wrote: > 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?.. Yes, you won't have to do anything. > or will i have to subclass the ui form once again? No. > .. 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... If you have setup your classes and build environment correctly=20 (Makefile.am) then all this automagically happens in the background. You=20 just modify the ui file and rerun make and got the result. At least it's=20 what I do in the KMyMoney project and I have seen this in many other=20 projects as well. > the tutorial didnt seem to mention this anywhere > > On 7/21/06, Aaron J. Seigo wrote: > > On Thursday 20 July 2006 4:40, Ahmed A=EFt 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 << =2D-=20 Regards Thomas Baumgart thb@net-bembel.de Check the KMyMoney open source http://www.net-bembel.de/ project at http://kmymoney2.sf.net/ GPG-FP: E55E D592 F45F 116B 8429 4F99 9C59 DB40 B75D D3BA =2D------------------------------------------------------------ New processes are created by other processes, just like new humans. New humans are created by other humans, of course, not by processes. (Unix System Administrator Handbook) =2D------------------------------------------------------------ --nextPart11334500.de4roPbYzg Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: http://www.net-bembel.de/ iD8DBQBEwdJlnFnbQLdd07oRAnLIAJ9qURoYRxLSkqKxSic0mVmGmOms2ACginSr KKA2zryAYYJkg3Kt6TkXlKc= =OIOC -----END PGP SIGNATURE----- --nextPart11334500.de4roPbYzg-- --===============1216597997== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << --===============1216597997==--