[Qt-interest] QLayout: Overlay?

micu micuintus at gmx.de
Fri Dec 3 11:59:14 CET 2010


Hi André,

thanks for your answer!


Am Freitag, 3. Dezember 2010, 07:49:04 schrieb Andre Somers:
> You may have to resort to manual positioning of widgets.

In fact, I started with manual positioning (I already feared layouts 
won't help me here). But I found it *really* cumbersome, and it soon 
gets quite messy with even a little more complex custom widgets. So, in 
a diskussion with a friend, we figured out that layouts would be the 
right way to go for me.


> That means that you'll have to rethink the construction of your
> form a bit. Keep the names in a layout with their connector, and
> build up from there.

Well, that was actually the second thing I tried ;) --- I thought about 
creating one single QGridLayout. But then I ended up with the problem of 
having no idea on how to overlay (or better: "underlay") the connector 
name QLabels with the QFrame :/. Sure, I could do this manually, but 
this isn't anything but ugly, I guess. And then, the connector name 
QLabels aren't aligned with the inside of the QFrame.

A quite similar problem is described here: 
http://lists.trolltech.com/pipermail/qt-interest/2010-
November/029520.html

That's why I came up with the imperfect solution I presented in my last 
mail. 


> The layoutsystem that you can use in QGraphicsView
> (QGraphicsAnchorLayout) and QML seem to be better suited for this
> kind of use case.

Thanks for the tips! I think, I have to investigate those two options.

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




More information about the Qt-interest-old mailing list