[Qt-interest] QLayout: Aligning elements with some elements outside and some elements inside of a widget

micu micuintus at gmx.de
Fri Dec 3 00:21:11 CET 2010


Hi there, 

I am new to this list and new to Qt --- so please excuse me, if my 
questions are a bit stupid ;).

I created a custom widget, which includes a name in a title bar, some 
connector names (QLabels), and some connector icons (I took radio 
buttons in this case). These connector names are inside of a QFrame, 
while the connector icons are outside of the QFrame --- see attached 
picture.

Now I want those connector icons to be aligned horizontally with the 
corresponding connector names (QLabels). I achieved a similar result 
with a workaround with QLayouts (see attached picture), but the 
alignment isn't perfect, as the frame of the QFrame takes a bit of the 
place.

Is there any (preferable, "Qt-like") way of doing this that results in 
perfect alignment of connector name labels and connector icons? More 
generally asked: Is there a way of aligning widgets/layouts within 
another widget and widgets/layouts outside of that widget?

Kind regards,
micu
-- 
GnuPG:		https://www1.inf.tu-dresden.de/~s3418892/micuintus.asc
Fingerprint:	1A15 A480 1F8B 07F6 9D12 3426 CEFE 7455 E4CB 4E80

<<</>>

http://www.micuintus.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: QtLayout.png
Type: image/png
Size: 29536 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101203/56e978e2/attachment.png 


More information about the Qt-interest-old mailing list