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. Can i change QTreeWidget/QTableWidget to a icon mode like QListWidget??

Can i change QTreeWidget/QTableWidget to a icon mode like QListWidget??

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 2.0k 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.
  • O Offline
    O Offline
    opengpu2
    wrote on last edited by
    #1

    Can i change QTreeWidget/QTableWidget to a icon mode like QListWidget??
    and setItemDelegate to it ?

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

      Hi,

      No it's QListView/Widget specific.

      Yes you can set a delegate on them.

      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
      • O Offline
        O Offline
        opengpu2
        wrote on last edited by
        #3

        is it simple to realize?
        now i temporarily use QStackedWidget to make one of the 2 widgets Visible

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

          Do you mean easy to set an item delegate ?

          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
          • O Offline
            O Offline
            opengpu2
            wrote on last edited by
            #5

            i use QListWidget first, and i want to use it which can dynamically switch between ListMode and IconMode. However, when i want the ListMode support multi-column...problem comes...
            now i do it like this, use a QStackedWidget, then put a QTreeWidget and a QListWidget into it, when i switch to multi-column ListMode i use QTreeWidget, when i switch to preview IconMode i use QListWidget's IconMode(and use ItemDelegate to customize the preview picture).........is there any better way to realize my work here?
            and right now i find another problem, when sort the WidgetItem, the QTreeWidget'Header has default sorting method, however, i don't know how to sort the QListWidget based on(and have the same result with) the QTreeWidget...

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

              What is the problem with the icon mode ?

              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

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved