Hello,
This incomplete func compiles and works. But item->pos().x(); always returns 0 to the variable xxx when run in the debugger (Win 7, mingw release w/ sdk). Note that the following data variables are filled properly from the items so we know that the rest of the mechanism is working. Could this actually be a bug in QT 4.7 or have I misunderstood the value function? I'm stumped on this one. Thanks.
Qt Code:
QList<QGraphicsItem*> Note::getNotesInMeasure() { QList<QGraphicsItem*>iList; QGraphicsItem* item; iList = scene->selectedItems(); if (!( iList.isEmpty() || iList.size() == 0 )){ int sz = iList.size(); int i; for (i=0; i<sz; i++){ item = iList.value(i); int xxx = item->pos().x(); if ( n == "Note" ) { msg(h); } } } return iList; }To copy to clipboard, switch view to plain text mode
Bookmarks