It's not the best solution, but I think it's the fastest: create a hidden column in which you store index of QStackedWiget's page that is associated with the item. This way you can do this in 1 line (in tree's currentItemChanged slot):
Qt Code:
ui->stackedWidget->setCurrentIndex(current->text(1).toInt());To copy to clipboard, switch view to plain text mode
Bookmarks