Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. A question on what Widget to use.
Qt 6.11 is out! See what's new in the release blog

A question on what Widget to use.

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 2.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Arukas
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Chris H
      wrote on last edited by
      #2

      The simplest "list" widget for your purposes is probably "QListView":http://developer.qt.nokia.com/doc/qt-4.8/qlistview.html. 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.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        goetz
        wrote on last edited by
        #3

        [[Doc:QListWidget]] is even simpler to use in case you don't have some sophisticated data storage on the backend.

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved