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. How to get QTableWidgets horizontal header?
Forum Updated to NodeBB v4.3 + New Features

How to get QTableWidgets horizontal header?

Scheduled Pinned Locked Moved General and Desktop
5 Posts 4 Posters 7.4k 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.
  • A Offline
    A Offline
    aurora
    wrote on last edited by
    #1

    Hi is there any way to get the QTableWidget's horizontal header directly?

    1 Reply Last reply
    1
    • M Offline
      M Offline
      maxoreli
      wrote on last edited by
      #2

      you will use horizontalHeader() 's method which returns an QHeader 'object that you can handle its properties for doing what you want.

      1 Reply Last reply
      1
      • R Offline
        R Offline
        Rahul Das
        wrote on last edited by
        #3

        or you can get a particular header of a column using "QTableWidget::horizontalHeaderItem ( int column ) ":http://doc.qt.nokia.com/latest/qtablewidget.html#horizontalHeaderItem


        Declaration of (Platform) independence.

        1 Reply Last reply
        1
        • A Offline
          A Offline
          aurora
          wrote on last edited by
          #4

          Thank u maxoreli and rahul...:) i did it...

          1 Reply Last reply
          0
          • ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #5

            the above link is broken. This is the link to Qt 5.1 "QTableWidget::horizontalHeaderItem(int col)":https://qt-project.org/doc/qt-5.1/qtwidgets/qtablewidget.html#horizontalHeaderItem

            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