Unsolved Patview incrementCurrentIndex
-
function moveText() { myPathView.incrementCurrentIndex(); myPathView.incrementCurrentIndex(); }
I am trying to move my pathview items by 2 lines. So i am calling incrementCurrentIndex twice. But it is getting incemented only once. Why ?
-
Hi, just guessing but maybe you need a processEvents() wedged in, say like this:
myPathView.incrementCurrentIndex(); qApp->processEvents(); myPathView.incrementCurrentIndex();
-
@hskoglund said in Patview incrementCurrentIndex:
qApp->processEvents();
@hskoglund : But Calling qApp->processEvents(); explicitly is not a suggested by Qt Best Practices.
-
@DonCoder I know, so if you test it and processEvents() helps, then you should refactor/rewrite your code and remove it.
-
Are you sure that the index is not incrementing ? Do console.log to see if the index is not updated. The view may not be updated as quickly as the model.