|
|
Pawel Stolowski wrote:
> Does anyone know how to rearrange icons when QIconsView' orientation
> changes?
> [...]
>
> So, I'd like to have logic like this (width, height reffer to QIconView's
> view & height):
>
> if (width > height) //horizontal orientation
> {
> put icons in as many columns as necessary (horizontal scrollbar),
> create minimum number of rows (avoid vertical scrollbar)
> }
> else // height >= width, vertical orientation
> {
> put icons in as many rows as necessary (vertical scrollbar),
> create minimum number of columns (avoid horizontal scrollbar)
Well, that was simple... In case someone would need it - just do:
iconview->setArrangement(o == Qt::Horizontal ? QIconView::TopToBottom :
QIconView::LeftToRight);
in parent dock window, in response to orientationChanged(...) signal.
Pawel
--
_________________________________
[ http://linux.bydg.org/~yogin/ ]
[ My Linux Projects ]
--
List archive and information: http://lists.trolltech.com/qt-interest/
|
|