Denis Rouzaud
Denis Rouzaud

Reputation: 2630

Qt Quick Controls 2 and QAbstractTableModel

I have a model based on QAbstractTableModel that I would like to use to display its content in a list in QML.

Actually, I need to display the first column only.

TableView does not exist in Qt Quick Controls 2 and suffers from performance issue and rendering issues on HiDPI devices.

There is suggestion in this question to use a ListView. But I fail to see how I can tell the model that I need to display the first column only.

Is there any solution for this ?

Upvotes: 0

Views: 291

Answers (1)

Denis Rouzaud
Denis Rouzaud

Reputation: 2630

This is automatically done in QML by ListView: the first column from the model is taken for any requested role.

Upvotes: 0

Related Questions