a guest Jun 18th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- QSqlQueryModel *model = database->fetchAll(SELECT id, name, last_name FROM users);
- QTableView *tableView = new QTableView();
- tableView->hideRow(0); // hide id
- const QModelIndex selectedRowModel = tableView->selectionModel()->selectedRows(); // i will get 'name', because 'id' is hidden
RAW Paste Data