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 can't hide columns & sorting question
Forum Updated to NodeBB v4.3 + New Features

QTreeView can't hide columns & sorting question

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

    So, i've been trying to hide columns on a QTreeView before setting the QFileSystemModel, whatever, setColumnHidden() or header()->hideSection() doesn't work either, the column of the QFileSystemModel is still there.

    And for sorting, i know there's a QSortFilterProxyModel, it's possible to for example put the folders at the end, and files with "x" extension at the start?
    QSortFileProxyModel has a setFilterRegExp, so that works for the files with extension. But what about folders?
    I think what i'm going to do here is more complicated. As, i want for example "x" extension always to be first, then "x" extension to be always second, etc.
    I don't know if that's easily done.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      Dimbreath
      wrote on last edited by
      #2

      hideColumn() worked, but before didn't.

      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