QListView / QListWidget with costum layout
I'm creating an application where I have a weather data and I want to create a listview with objects from the list . I want to dispaly a temperature, picture of the weather and for example a date...and for that I need something as is ArrayAdapter in Android but I cannot find anything like it. could you please tell me how can I create something like this? thank you.
Hi and welcome
It is not really clear if you mean for desktop or for mobile.
For desktop, you can listview with a custom model
If you are more into something less involved and not 10.000 items then
using a scroll area widget with a layout and widgets as container for each row
containing the Image, label and what you need.
@mrjj Hello, thank you
Right now desktop:)
thank you again
The scroll area is/can become heavy on mobile devices where as model /view
is super optimised. That said, I was very surprised on desktop that 5000
rows was not really as heavy as expected.
Also, to show image on screen. you can use a Qlabel. Im mention it as when I started
i did not really think label would show image :)
Hi and welcome to devnet,
Sounds like a job for QStyledItemDelegate