Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt Academy Launch in California!

    Solved header is selected in tableView !

    General and Desktop
    3
    3
    313
    Loading More Posts
    • 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
      Pada_ last edited by

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

      1 Reply Last reply Reply Quote 0
      • Prince_0912
        Prince_0912 last edited by

        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 Reply Quote 1
        • SGaist
          SGaist Lifetime Qt Champion last edited by

          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 Reply Quote 1
          • First post
            Last post