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)
Forum Updated to NodeBB v4.3 + New Features

Can't set column fixed width(QTableWidget)

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 3 Posters 1.6k 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.
  • E Offline
    E Offline
    Engelard
    wrote on 23 Oct 2018, 05:59 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

    R 1 Reply Last reply 23 Oct 2018, 06:04
    0
    • E Engelard
      23 Oct 2018, 05:59

      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

      R Offline
      R Offline
      Ratzz
      wrote on 23 Oct 2018, 06:04 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
      • V Offline
        V Offline
        VRonin
        wrote on 23 Oct 2018, 07:10 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

        1/3

        23 Oct 2018, 05:59

        • Login

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