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. QTreeView in single line format
Forum Updated to NodeBB v4.3 + New Features

QTreeView in single line format

Scheduled Pinned Locked Moved Unsolved General and Desktop
qtreeview
5 Posts 3 Posters 474 Views 1 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.
  • A Offline
    A Offline
    avmg
    wrote on last edited by
    #1

    Hi all!

    Does anyone know how to set a folder explorer in a single line like the picture below?

    13daaa2b-4138-48fb-bb47-bd9d9fed185e-image.png

    At the moment i'm using a QTreeView and a QFileSystemModel to show a similar window like the bottom-left in the picture, but in order minimize the size of the QTreeView I would like to add a edit or bar like the one shown in red.

    Thanks in advance!

    avmg

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

      Hi,

      It's called a breadcrumb. You should check KDE's Dolphin file manager code. It does what you are looking for.

      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
      2
      • A Offline
        A Offline
        avmg
        wrote on last edited by
        #3

        @SGaist said in QTreeView in single line format:

        breadcrumb

        Ok! I just downloaded now and i'm going to try to extract from that. Thanks!

        1 Reply Last reply
        0
        • A avmg

          Hi all!

          Does anyone know how to set a folder explorer in a single line like the picture below?

          13daaa2b-4138-48fb-bb47-bd9d9fed185e-image.png

          At the moment i'm using a QTreeView and a QFileSystemModel to show a similar window like the bottom-left in the picture, but in order minimize the size of the QTreeView I would like to add a edit or bar like the one shown in red.

          Thanks in advance!

          avmg

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

          @avmg said in QTreeView in single line format:

          At the moment i'm using a QTreeView and a QFileSystemModel to show a similar window

          Then probably you can use KBreadcrumbSelectionModel directly without reverse engeneering Dolphin.

          To then display it that way you will probably need QTransposeProxyModel to make the model span columns instead of rows and some styling of QTableView to make it look nicer

          "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
          • A Offline
            A Offline
            avmg
            wrote on last edited by
            #5

            Thanks VRonin, that is probably easier.

            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