--nextPart2235687.LEqslJRNb2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Last week Ellen posted an update on the way they HCI people wanted to make= =20 clear how we should do layout of dialogs; see http://www.kdedevelopers.org/node/2745 I've found that the proposed alignment is pretty darn hard to do in Qt=20 Designer. Doing right align is one thing; but aligning the items in multip= le=20 groupboxes is a lot harder to do properly. So, I had an idea; do this programmatically using a visitor which traverse= s=20 all the widgets. I added a class in KOffice libs to do just that. It takes a 'normal' dialog= as=20 we have been creating them in KDE3 for ages and adds alignments / minimum=20 sizes to get the wanted results. Note that it is even capable of aligning t= he=20 columns across tabs. ;) Now; here is my question to k-c-d. I need the proper coordinates of the (layouted) widgets to do the job, to=20 determine what should line up and what not. Prior to showing the dialog=20 widgets don't have a coordinate. Some are at 0,0 In fact; even on the showEvent of the dialog widgets that are in a nested=20 layout have coordinates 0,0 I ended up with a singleshot in the KPageDialog inheriting class which is=20 called from the viewEvent(). This has 2 nasty side effects; 1) I need to add some 10 lines to each dialog to do this 'trick'. 2) The layout jumps due to being layouted twice. Hardly noticeable, but sti= ll. We could move this to KDialog to avoid the first problem, but I see no=20 solution for the second problem. Thoughts, ideas, flames, praise? See; http://members.home.nl/zander/images/layoutvisitor-indent-spacing.png and after; http://members.home.nl/zander/images/layoutvisitor-indent-spacing-after.png Another one; http://members.home.nl/zander/images/layoutvisitor-pageLayout.png and after; http://members.home.nl/zander/images/layoutvisitor-pageLayout-after.png The class; http://websvn.kde.org/trunk/koffice/libs/kofficeui/KoLayoutVisitor.h?view= =3Dlog =2D-=20 Thomas Zander --nextPart2235687.LEqslJRNb2 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQBGEiwECojCW6H2z/QRAk/XAKDA7RsiagbqRWwN4HzxkeGOizZaBACcCeAj bLpTzzELIu5DfJJEYddxIbU= =axeI -----END PGP SIGNATURE----- --nextPart2235687.LEqslJRNb2--