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. Custom QListWidget ?
Forum Updated to NodeBB v4.3 + New Features

Custom QListWidget ?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 1.9k 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.
  • R Offline
    R Offline
    repac3r
    wrote on last edited by
    #1

    Hey everybody,

    i am searching for a QListWidget like this: http://postimg.org/image/6c51xovw7/
    I think the itemdesign in this list is very nice and now my question is, how can i do
    the same, or something like the same ?

    1 Reply Last reply
    0
    • B Offline
      B Offline
      bodzio131
      wrote on last edited by
      #2

      See QListWidget::setItemWidget documentation, it gives possibility to set custom widget for your list items if they have static content. If you want custom editor or/and dynamic content then you need to use QListView and QItemDelegate custom implementation.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        With the topics and the various data layout like that, it makes me think of a QTreeView that's been heavily styled

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          i would also suggest using a QTreeView and use "stylesheets":http://qt-project.org/doc/qt-4.8/stylesheet-examples.html#customizing-qtreeview.
          This would be the least amount of work i think.
          So your title rows have a col count of 1 and the only indexes with children. This let's you style it easily.

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          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