swiety
8th July 2008, 21:42
I have problem with QComboBox::setCurrentIndex( int ). I have siply tree model, like this ( QComboBox::setModel() and QComboBox::setView() ) :
---- A // index = 0
----------- B // index = 0
------------ C // index = 1
----------- D // index = 2
----- E // index = 1
----- F // index = 2
----- G // index = 3
B,C and D have parent A. So, when i call QComboBox::setCurrentIndex( 1 ), then currentIndex is for E. But how can i set currentIndex for C ? SetCurrentIndex / SetCurrentItem in model / view doesn't work. Any idea?
---- A // index = 0
----------- B // index = 0
------------ C // index = 1
----------- D // index = 2
----- E // index = 1
----- F // index = 2
----- G // index = 3
B,C and D have parent A. So, when i call QComboBox::setCurrentIndex( 1 ), then currentIndex is for E. But how can i set currentIndex for C ? SetCurrentIndex / SetCurrentItem in model / view doesn't work. Any idea?