Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Do I have to write my own TableView headerDelegate from scratch?
Forum Updated to NodeBB v4.3 + New Features

Do I have to write my own TableView headerDelegate from scratch?

Scheduled Pinned Locked Moved QML and Qt Quick
tableviewdelegate
2 Posts 2 Posters 907 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.
  • B Offline
    B Offline
    betty_crokker
    wrote on last edited by
    #1

    Using Qt 5.5, I've got a TableView where I need to tweak the header slightly - I want to set the font's point size and make it underlined.

    As far as I can tell, I can't just say "take the default headerDelegate and modify the font", my only option for doing this is to create my own headerDelegate and re-create the entire headerDelegate from scratch.

    1. Why isn't there a TableViewHeaderDelegate widget that I can "inherit" and just modify the font? Or is there, and I just don't know where to look?

    2. Is there an example somewhere showing how to get the UI for sorting to work?

    Thanks,
    Chris

    p3c0P 1 Reply Last reply
    0
    • B betty_crokker

      Using Qt 5.5, I've got a TableView where I need to tweak the header slightly - I want to set the font's point size and make it underlined.

      As far as I can tell, I can't just say "take the default headerDelegate and modify the font", my only option for doing this is to create my own headerDelegate and re-create the entire headerDelegate from scratch.

      1. Why isn't there a TableViewHeaderDelegate widget that I can "inherit" and just modify the font? Or is there, and I just don't know where to look?

      2. Is there an example somewhere showing how to get the UI for sorting to work?

      Thanks,
      Chris

      p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      @betty_crokker

      Why isn't there a TableViewHeaderDelegate widget that I can "inherit" and just modify the font? Or is there, and I just don't know where to look?

      There is no such way to do so. No such functionality provided yet.

      Is there an example somewhere showing how to get the UI for sorting to work?

      You can use the method described here. Basically it is a QML wrapper around QSortFilterProxyModel and works with ListModel.

      157

      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