Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    I want make custom List Item

    General and Desktop
    4
    4
    5828
    Loading More Posts
    • 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
      ttti07 last edited by

      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 Reply Quote 0
      • A
        alexander last edited by

        ListItem for QML ListView?

        1 Reply Last reply Reply Quote 0
        • D
          DenisKormalev last edited by

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

          1 Reply Last reply Reply Quote 0
          • M
            Morris last edited by

            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 Reply Quote 0
            • First post
              Last post