PDA

View Full Version : adjustSize for right adjustement



square
23rd May 2006, 08:53
Hi all,

I use Qt/Mac 4.1.3 and use the function adjustSize() to adjust the size in my derived
QLabel class. This works fine when the QLabel's content is left adjusted. But with a right adjustement it will do the same as it were left adjusted.

What it should do:
The right edge of the QLable should stay where it was and the left part should resize.

Does anyone know how to solve this, or is there a better way?

Thanks,
square

jpn
23rd May 2006, 09:03
How about a horizontal layout?

hboxlayout:

|-------|-----|
|stretch|label|
|-------|-----|


QWidget::adjustSize() just tries to resize the widget according to it's size hint..