Solved Aceed to an element of listView
-
I must aceed to the first element of the list:
I tried :
ui->listView->setCurrentIndex(0);
but it doesn't want int -
Can you clarify what you mean by "aceed"?
-
@VRonin I want to obtain the name of the first element of listView
-
qDebug() << ui->listView->model()->index(0,0).data();
-
@VRonin said in Aceed to an element of listView:
ui->listView->model()->index(0,0).data();
It said to me "invalid"
-
@vale88
Hi
maybe you call that before you put data i model or something similar? -
The other option is you are using
setIndexWidget
. In that case we can't be friends until you redeem your soul. -
@mrjj no I call this after
-
@vale88 I solved thanks
-
@vale88
what was wrong then?
Its good to tell solution as we all learn from it :)