nammidd
17th June 2018, 20:59
By default, how to select the first row in QTableView with QFileSystemModel? When i use table->selectRow(0) it selects nothing, when i use QObject::connect(model, &My_model::directoryLoaded, [&]{table->selectRow(0);}); it selects fourth row. But if i use table->selectRow(0) in events (void keyPressEvent(QKeyEvent *event) for example), it works ok, what is the problem?