How i can find item index in QGraphicsLinearLayout, like findWidget in QLayout? And how i can remove stretch?
How i can find item index in QGraphicsLinearLayout, like findWidget in QLayout? And how i can remove stretch?
Write your own findItem:
Qt Code:
{ for ( int nItem = 0; nItem < pLayout->count(); ++nItem ) if ( pItem == pLayout->itemAt( nItem )->graphicsItem() ) return nItem; return -1; }To copy to clipboard, switch view to plain text mode
As for removing stretch, I suppose it occupies an index in the QGraphicsLinearLayout, so QGraphicsLinearLayout::removeAt() should do it.
bmn (23rd May 2014)
Bookmarks