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. TableView with multiple resize mode

TableView with multiple resize mode

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 238 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.
  • M Offline
    M Offline
    masa4
    wrote on last edited by
    #1

    I have a table with several columns. When I set it like this, the content is occupying whole free space:

    ui->tableView->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
    

    But when i am not in fullscreen, some contents not fits to its column size. QHeaderView::ResizeToContents does this job. But when I use it, the tableview not occupy whole free space but just needed space. I want to use them together with QHeaderView::Interactive but last called one overrides formers. How can I do this?

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

      Hi,

      One possible way would be to change the resize mode when the window state changes, get the result wanted and then change it back to interactive.

      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