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. Returning specific section of a QHeaderView

Returning specific section of a QHeaderView

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 228 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.
  • Dummie1138D Offline
    Dummie1138D Offline
    Dummie1138
    wrote on last edited by
    #1

    Hi. I have a QTableView with a QHeaderView split into sections. There is a button I want to place specifically in one of these sections. Is there a way to specify this? I have been unable to find anything on the QTableView or QHeaderView documentation.

    This is the code I am using this for.

    QHBoxLayout *layout = new QHBoxLayout(ui->tableWidget_Configs->horizontalHeader());   //I'm not sure how to specify which sections in the horizontal Header to place the button in.
    layout->addWidget(ui->pushButton_SelectAll);
    

    Please let me know if more information is required.

    JonBJ 1 Reply Last reply
    0
    • Dummie1138D Dummie1138

      Hi. I have a QTableView with a QHeaderView split into sections. There is a button I want to place specifically in one of these sections. Is there a way to specify this? I have been unable to find anything on the QTableView or QHeaderView documentation.

      This is the code I am using this for.

      QHBoxLayout *layout = new QHBoxLayout(ui->tableWidget_Configs->horizontalHeader());   //I'm not sure how to specify which sections in the horizontal Header to place the button in.
      layout->addWidget(ui->pushButton_SelectAll);
      

      Please let me know if more information is required.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Dummie1138
      I think you should Google for widget on QHeaderView. There are several answers/examples to look through, e.g. https://stackoverflow.com/questions/27000484/add-custom-widgets-as-qtablewidget-horizontalheader and https://stackoverflow.com/questions/56823549/how-to-add-qlabel-object-to-qheaderview

      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