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. header is selected in tableView !
Forum Updated to NodeBB v4.3 + New Features

header is selected in tableView !

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

    How do I determine if a header is selected instead of a row or column in tableView?

    1 Reply Last reply
    0
    • Prince_0912P Offline
      Prince_0912P Offline
      Prince_0912
      wrote on last edited by
      #2

      Hi @Pada_ ,
      You can check header is select or not by,
      get a pointer to a QHeaderView object using QTableView's verticalHeader() and horizontalHeader() methods.

      and setting up header you can use,

      void QTableView::setHorizontalHeader(QHeaderView *header)

      void QTableView::setVerticalHeader(QHeaderView *header)

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

        Hi,

        sectionClicked might be of use here.

        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
        1

        • Login

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