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. best way to display custom note widgets in a list
QtWS25 Last Chance

best way to display custom note widgets in a list

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 148 Views
  • 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.
  • M Offline
    M Offline
    myShrimp
    wrote on last edited by
    #1

    Hey,
    i'm working on a note app and have created my own note widget that i want to display in a list. since i'm very new to qt, i'm wondering what the best way is. i created a prototype in pyqt, but i used a scrollarea with a vertical layout and i don't think that's the right way.
    now in qt creator with c++ i have tried to display the widgets in a qlistwidget, as itemwidgets, but i have problems with moving an edited note to the top of the list.
    i have read about qlistview and qstyleditemdelegate but could not find out how to use them correctly.

    thanks in advance for any assistance 🦐

    1 Reply Last reply
    0
    • gde23G Offline
      gde23G Offline
      gde23
      wrote on last edited by
      #2

      I would go for a QStyledItemDelegate on a QListView.
      To be able to see the editors also when not editing what you probably want you need to also reimplement paint().
      The Star Delegate example is a good example to start with.

      1 Reply Last reply
      3
      • M Offline
        M Offline
        myShrimp
        wrote on last edited by
        #3

        Thank you very much!

        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