You are not logged in.

#1 2011-08-24 00:04:24

tony5429
Member
Registered: 2006-03-28
Posts: 1,020

How to Create a Gallery of Images in a Qt App

I'm working on a Qt project and would like to display images (with text) which the user can click, just like in the KDE Desktop Background selector below.

http://oi56.tinypic.com/jggjrp.jpg

Does anyone know the name of that widget?


mod edit: Hello, please read Forum Etiquette: Pasting Pictures and Code. Thanks. --fsckd

Last edited by fsckd (2011-08-24 00:51:44)

Offline

#2 2011-08-24 05:56:55

lunar
Member
Registered: 2010-10-04
Posts: 95

Re: How to Create a Gallery of Images in a Qt App

An "QListView" with a model that returns the image as "QPixmap" for "Qt::DecorationRole".  Alternatively a "QListWidget" with items that have the image set as "QPixmap" for "Qt::DecorationRole" (by using "QListWidgetItem::setData()")

Last edited by lunar (2011-08-24 05:57:22)

Offline

Board footer

Powered by FluxBB