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. Qt equivalent to ListView Control of WinAPI
Forum Updated to NodeBB v4.3 + New Features

Qt equivalent to ListView Control of WinAPI

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 4 Posters 964 Views 2 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.
  • S Offline
    S Offline
    Samuel Ives
    wrote on last edited by
    #1

    Lately I have tried to create a list view like the native windows in qt (Sample image of utorrent at the end of the post), but the closest I got to it was with QTableView, I wanted the user to adjust the width of the columns like mouse and being able to add other widgets inside the column as natively, should be possible since qBittorrent does exactly as I want using Qt.

    uTorrent example

    qBittorrent examle

    VRoninV JKSHJ 2 Replies Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Do you mean the control in the left ?
      Then it looks like a QTreeView.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      S 1 Reply Last reply
      1
      • S Samuel Ives

        Lately I have tried to create a list view like the native windows in qt (Sample image of utorrent at the end of the post), but the closest I got to it was with QTableView, I wanted the user to adjust the width of the columns like mouse and being able to add other widgets inside the column as natively, should be possible since qBittorrent does exactly as I want using Qt.

        uTorrent example

        qBittorrent examle

        VRoninV Offline
        VRoninV Offline
        VRonin
        wrote on last edited by
        #3

        @Samuel-Ives said in Qt equivalent to ListView Control of WinAPI:

        I wanted the user to adjust the width of the columns like mouse

        This is the default behaviour, if you can't you you just need to adjust the sectionResizeMode of the header

        @Samuel-Ives said in Qt equivalent to ListView Control of WinAPI:

        add other widgets inside the column

        this depends on your delegate implementation, see QStyledItemDelegate

        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
        ~Napoleon Bonaparte

        On a crusade to banish setIndexWidget() from the holy land of Qt

        1 Reply Last reply
        2
        • S Samuel Ives

          Lately I have tried to create a list view like the native windows in qt (Sample image of utorrent at the end of the post), but the closest I got to it was with QTableView, I wanted the user to adjust the width of the columns like mouse and being able to add other widgets inside the column as natively, should be possible since qBittorrent does exactly as I want using Qt.

          uTorrent example

          qBittorrent examle

          JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          @Samuel-Ives said in Qt equivalent to ListView Control of WinAPI:

          should be possible since qBittorrent does exactly as I want using Qt.

          You can study exactly how qBittorrent does it.

          • The view at the top-right is TransferListWidget: https://github.com/qbittorrent/qBittorrent/blob/master/src/gui/transferlistwidget.cpp
          • The progress bars are painted using TransferListDelegate: https://github.com/qbittorrent/qBittorrent/blob/master/src/gui/transferlistdelegate.cpp

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          3
          • SGaistS SGaist

            Hi,

            Do you mean the control in the left ?
            Then it looks like a QTreeView.

            S Offline
            S Offline
            Samuel Ives
            wrote on last edited by
            #5

            @SGaist in the center where the list of torrents downloading.

            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