[Qt-interest] Selection not showing?

KC Jones kc at asperasoft.com
Sat Apr 3 01:59:20 CEST 2010


Never mind.  I was selecting the first column of the correct row. But
that column was hidden.

By adding the QItemSelectionModel::Row flag, all is well.

On Fri, Apr 2, 2010 at 4:33 PM, KC Jones <kc at asperasoft.com> wrote:
> I have a QTreeView widget.
> I get its selection model.
> I use that to select an item in the tree widget:
>
>        m_ui->table->selectionModel()->select(idmapped,
> QItemSelectionModel::SelectCurrent);
>        m_ui->table->scrollTo(idmapped);
>
> The current item is correct.  If I use arrow keys to navigate, the
> navigation starts at the correct item.
> When I check the selection model, it is correct.
>
> But the selected item is not displayed as selected.
>
> What am I missing?
>




More information about the Qt-interest-old mailing list