December 28, 2011

Arukas Arukas
Lab Rat
81 posts

A question on what Widget to use.

 

Hello,

I have been looking at widgets, and haven’t found the right one yet. I’d like to ask for suggestions. I have a fairly long list of items, and I would like some type of list widgets. (The ones I look at, don’t seem to be for simple use like I want) I’d like the user to be able to click on the a list items, and the GUI displays that items data.

I’m still fairly new at Qt, and the technical explanations are still overwhelming and i can’t tell if they do what I want them to do. I’m just trying to make something simple.

-Thanks
Arukas

3 replies

December 28, 2011

Chris H Chris H
Lab Rat
139 posts

The simplest “list” widget for your purposes is probably QListView [developer.qt.nokia.com]. You will need to write a little code to determine when a user clicks on an item, and then to display the proper data wherever you would like it.

December 28, 2011

Volker Volker
Robot Herder
5428 posts

QListWidget is even simpler to use in case you don’t have some sophisticated data storage on the backend.

December 29, 2011

Andre Andre
Area 51 Engineer
6031 posts

I think a QListView in combination with a QStandardItemModel or even a [[QStringListModel]] is just as simple, and way more flexible.

 Signature 

Looking for Qt developers to join our team @ i-Optics: https://qt-project.org/forums/viewthread/25393/

 
  ‹‹ Good resource on how to use QNetworkAccessManager & QNetworkReply correctly?      OpenGL OS-X Lion 2.1 vs 3.2 context ››

You must log in to post a reply. Not a member yet? Register here!