Returning specific section of a QHeaderView
-
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.
-
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.
@Dummie1138
I think you should Google forwidget 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