Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

[Solved] Display text and image in Tableview

$
0
0
I have a QAbstractTableModel and use QML’s TableView to display it. Roles are used to determine the column to display. itemDelegate is used for the TableView cells Depending on the information in table, for some cells a icon has to display beside the text. What is a approach to transfer: a text from the data model a status value from the data model My first approaches were: return value like: “Text:\“text to display\“Icon:TheImage.png” —> requires text parsing in qml file overlay two TableViews: one for text, one for icons —> both icons’s size and text size does not influence each other So I dismiss these.

Viewing all articles
Browse latest Browse all 4972

Trending Articles