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. Can't set column fixed width(QTableWidget)
Qt 6.11 is out! See what's new in the release blog

Can't set column fixed width(QTableWidget)

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 3 Posters 1.8k 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.
  • EngelardE Offline
    EngelardE Offline
    Engelard
    wrote on last edited by
    #1

    I want to prevent user for resizing column width, but i for some strange reason don't have any functions which do that. From google i found some solutions, but none of that function is available for me:

    ->setSectionResizeMode (QHeaderView::Fixed);
    

    don't exist

    ->setResizeMode();
    

    same.

    I really can't understand what's going on...

    alt text

    RatzzR 1 Reply Last reply
    0
    • EngelardE Engelard

      I want to prevent user for resizing column width, but i for some strange reason don't have any functions which do that. From google i found some solutions, but none of that function is available for me:

      ->setSectionResizeMode (QHeaderView::Fixed);
      

      don't exist

      ->setResizeMode();
      

      same.

      I really can't understand what's going on...

      alt text

      RatzzR Offline
      RatzzR Offline
      Ratzz
      wrote on last edited by Ratzz
      #2

      @Engelard said in Can't set column fixed width(QTableWidget):

      ->setResizeMode();

      Is obsolete.

      U need to use setSectionResizeMode
      http://doc.qt.io/qt-5/qheaderview-obsolete.html#setResizeMode

      --Alles ist gut.

      1 Reply Last reply
      3
      • VRoninV Offline
        VRoninV Offline
        VRonin
        wrote on last edited by
        #3

        Remember to #include <QHeaderView>, it does not come with the view headers (and you shouldn't rely on them anyway)

        "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
        3

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved