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. I want make custom List Item
Forum Updated to NodeBB v4.3 + New Features

I want make custom List Item

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

    I want make custom List Item look like this:


    (icon) (text)
    (text) (spin box) (text)


    ★ star
    quantity: ___Ea


    ● circle
    quantity: ___Ea


    ☎ telephone
    quantity: ___Ea


    (It may have a scroll bar on the right side, too)

    Actually, once I made it with Widget class but it's just a Widget rather than a List.
    Also I've heard about MVC concept and some related classes (i.e. QAbstractListModel and ItemView, Deligate, etc.),
    but it's somewhat difficult (and I'm not good at English) so I cannot understand it without some examples.
    Is there any simple example code or VERY easy program source code implementing this kind of List Item?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      alexander
      wrote on last edited by
      #2

      ListItem for QML ListView?

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DenisKormalev
        wrote on last edited by
        #3

        I think examples/itemviews will help you. Something like spinboxdelegate or stardelegate

        1 Reply Last reply
        0
        • M Offline
          M Offline
          Morris
          wrote on last edited by
          #4

          Well, forget QListView.
          It's the last thing you want..
          All you have to do is to create a new widget class. Then you create a layout class to layout the widgets in vertical or whatever you want.
          You don't have to make the layout class inherit from the QLayout things. Just make your own. It should be really simple.

          For example, you're making a twitter client. Then you can make a widget call EntryWidget. Then you create 100 of them. And use the layout class to position them.

          Oh, I forget to say maybe you need a QScrollBar..

          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