Solved Create Content List from Data File
-
@jsulm I am able to read CSV, but my concern is how can I create contents list (as shown in attached picture). I am able to read data from CSV, but how can I display it in that particular style (reference picture is attached)?
-
@ahsan737 Depends.
Do you want to use Qt Widgets (then take a look at https://www.bogotobogo.com/Qt/Qt5_QListView_QStringListModel_ModelView_MVC.php) or QML? -
@jsulm I have written code in C++ as I am unfamiliar with QML. Please suggest a suitable approach to display data in that specific style. and also the user should be able to click that (3 line view set which will further display complete data).
-
@ahsan737 said in Create Content List from Data File:
Please suggest a suitable approach to display data in that specific style
See my link above
-
@jsulm I have visited that link, that model has a simple look, how can little graphics be added into it? and show 3 lines (3 lines will display data related to one measurement/object) as one unit which can be opened using click to show further details.
-
@ahsan737
You can customize the UI as you like it.
In case if you want rich UI or graphics contents I would suggest you to go with QML. -
Hi
To change how the View will render the items, you can use a delegate
https://doc.qt.io/qt-5/qstyleditemdelegate.html
That allows you to change how a cell is render ( or all cells)
and you would use its paint function to draw 3 lines of text. -
@Pradeep-P-N thank you so much for the kind suggestion, isn't it there a way to get rich Graphics using c++?
@mrjj Thank you, I will try to implement this. I am a beginner so sometimes it is hard to understand the Qt documentation. If you know any good example of this implementation then please share it. I am really thankful.
-
-
@ahsan737
AFAIK, QML / QtQuick has better & rich Graphics classes & components than C++ (Qt Widget based GUI).All the best.