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. defaultsectionsize qheaderview
Qt 6.11 is out! See what's new in the release blog

defaultsectionsize qheaderview

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 400 Views
  • 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.
  • F Offline
    F Offline
    firen
    wrote on last edited by firen
    #1

    Hi,

    I override QHeaderView and in the constructor i set the minimal section size with "setMinimumSectionSize" and I want to set de default section size with "setDefaultSectionSize".

    setDefaultSectionSize seems not working because if I check it with:

        int x;
        x = defaultSectionSize(); // x = 30? Default i guess?
        this->setDefaultSectionSize(10);
        x = defaultSectionSize(); // x = 25 -> ALWAYS. Why not 10? Why 25?
    

    Interesting is, that the same works without problems with setMaximumSectionSize...

    Furthermore I am searching for a good explanation how to debug into the QT-Code (with Visual Studio because I have to use VS). Has someone a hint for a good tutorial or what ever? Maybe then it would be easier to find reasons for this by myself :-)

    Thanks!

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by Christian Ehrlicher
      #2

      It's because the minimum section size is 25 in your case.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      F 1 Reply Last reply
      2
      • Christian EhrlicherC Christian Ehrlicher

        It's because the minimum section size is 25 in your case.

        F Offline
        F Offline
        firen
        wrote on last edited by
        #3

        @Christian-Ehrlicher Thanks! :-)

        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