--===============9033082868037713378== Content-Type: multipart/signed; boundary="nextPart1823424.D2d9ds0meG"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1823424.D2d9ds0meG Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable On Saturday, 2012-02-11, Jan Kalcic wrote: > On 02/11/2012 10:24 AM, Kevin Krammer wrote: > > On Saturday, 2012-02-11, Jan Kalcic wrote: > >> Hi there, > >>=20 > >> It is a bit I am getting to know Qt developing small and almost useless > >> applications just to practice, particularly using Qt Creator (I find it > >> very easy, intuitive, powerful and also cool BTW) > >>=20 > >> Now I have one app which I am starting to take more seriously and with > >> this I would like to "swtich" to KDE classes. It seems to be not too > >> difficult but I still have a missing point. I assume it is possible to > >> use .ui forms created with QtCreator/Designer and I also assume that t= he > >> .ui file which is converted in the header file by the UIC (invoked > >> automatically by qmake) is the same XML file I can use as .rc file > >> (needed by KXMLGUIClient). Am I wrong? I am sure I am as it does not > >> work and it also seems the two XML files actually have difference > >> syntax. > >>=20 > >> So how can this be achieved? > >=20 > > As Andreas already said those two are independent and for different > > purposes. > >=20 > > You continue to use your .ui files the same way you do in a normal Qt > > application. > >=20 > > KXMLGUIClient stuff is mainly for the main window's menu's and toolbars, > > a main window's content will in most cases still be a designer created > > widget. >=20 > Understand, now I see where I was wrong. I have just stripped out from > the constructor the ui->setupUi(this); as I thought the > setupGUI(Default); was the replacement. Instead I need them both, the > first one to generate the User Interface and second one to add menus > toolbars etc etc.. >=20 > What it was actually misleading was the fact the GUI did not appear, > without throwing any error BTW, when I was trying to not setup the Ui > with ui->setupUi(this); > Now I see the problem was instead the function setCentralWidget(this); > when this is called the GUI still does not appear. I still need to > investigate why, do not if you guys have any suggestion.. setupCentralWidget(this)? As in this =3D=3D main window? This would not work, the window can't be a child of itself. Try this instead: QWidget *widget =3D new QWidget(this); ui->setupUi(widget); setCentralWidet(widget); Even better would be to create a widget subclass for the central widget and= =20 call setupUi in its constructor and implement all the central widget's=20 functionality in there. Cheers, Kevin =2D-=20 Kevin Krammer, KDE developer, xdg-utils developer KDE user support, developer mentoring --nextPart1823424.D2d9ds0meG Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iD8DBQBPN35EnKMhG6pzZJIRAiOHAJ9BBiqHNs2JezYYp7SbZ8jzbtbT+gCfcNFW EJ4uDGbVG8jzMANtjRMQJUc= =t1SY -----END PGP SIGNATURE----- --nextPart1823424.D2d9ds0meG-- --===============9033082868037713378== 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 << --===============9033082868037713378==--