devdon
30th September 2011, 21:34
QList<QGraphicsItem*> iList;
iList = scene->selectedItems();
QRectF bRect = scene->selectionArea().boundingRect();
Hello: The above code returns
h (qreal)
w (qreal)
x -nan(0xffffe1518ee2)
y (qreal)
Since I am new to QT perhaps this is to be expected, but the selectedItems() function seems a bit sketchy. I have an important routine that relies on it and it doesn't seem to return all the items consistently. Has anyone an explanation or similar experiences?
iList = scene->selectedItems();
QRectF bRect = scene->selectionArea().boundingRect();
Hello: The above code returns
h (qreal)
w (qreal)
x -nan(0xffffe1518ee2)
y (qreal)
Since I am new to QT perhaps this is to be expected, but the selectedItems() function seems a bit sketchy. I have an important routine that relies on it and it doesn't seem to return all the items consistently. Has anyone an explanation or similar experiences?