[Interest] Layout problem

Christian Gagneraud chris at techworks.ie
Tue May 8 11:25:39 CEST 2012


Hi list,

I'm trying to create a simple composite widget as following:
- Container is a QGroupBox
- Top widget is a compass (square shaped design based on the analog 
clock example)
- Below the compass are 2 pairs of labels/value

I would like the compass to occupy as much space as possible and the 2 
labels/values to just "stick" below the compass.
I have tried different solutions using the QVBoxLayout and the 
QGridLayout, with not much success. In all cases, I had the labels 
"pushing" the compass toward the top and causing its size to be too small.
Is it a way to tell the layout to always keep the compass' size as big 
as possible? Basically I would like that the compass width follows the 
QGroupBox's width, and pushing or pulling the 2 pairs of labels/values 
up and down (due to the compass square constraint)

Regards,
Chris




-- 
Christian Gagneraud,
Embedded systems engineer.
Techworks Marine
1 Harbour road
Dun Laoghaire
Co. Dublin
Ireland
Tel: + 353 (0) 1 236 5990
Web: http://www.techworks.ie/



More information about the Interest mailing list