Results 1 to 3 of 3

Thread: How to fill QListWidget with custom widgets by using QStringList as data model

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2014
    Posts
    23
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows Android

    Default Re: How to fill QListWidget with custom widgets by using QStringList as data model

    You might want to have a look at QItemDelegate.
    Using a delegate enables you to completely customize the look of your items in a QListView (and other item containers as well).

  2. The following user says thank you to Killian for this useful post:

    EneRevo (8th November 2016)

  3. #2
    Join Date
    Nov 2016
    Posts
    2
    Thanks
    1
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to fill QListWidget with custom widgets by using QStringList as data model

    This looks like the missing piece I wasn't aware of.

    Thank you.

    Edit:
    Maybe I was a bit to fast.

    The Delegate actually looks like what I wanted,
    but I can't figure out how to use my designed QWidget with it or draw a QPushButton in the paint function (due to other forums and threads it isn't possible to draw a PushButton there, true?).
    Last edited by EneRevo; 8th November 2016 at 13:35.

Similar Threads

  1. Replies: 9
    Last Post: 14th February 2013, 19:39
  2. How to lock data petition for a custom model ?
    By tonnot in forum Qt Programming
    Replies: 5
    Last Post: 2nd November 2011, 08:32
  3. Combine custom delegate and model data() roles
    By qlands in forum Qt Programming
    Replies: 1
    Last Post: 4th October 2011, 12:43
  4. mapping composite data from model to widgets
    By tzeentch.gm in forum Newbie
    Replies: 4
    Last Post: 4th October 2011, 06:32
  5. Custom model for QTreeView with SQLite data source
    By emanuel in forum Qt Programming
    Replies: 0
    Last Post: 19th January 2011, 00:53

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.