c++ - 如何访问 QHeaderView::sectionsInserted 插槽

标签 c++ qt

我想知道如何访问 sectionsInserted 插槽。我需要访问该方法的参数。因为它是一个 protected 插槽,我认为我需要从 QHeaderView 继承。现在,即使我从 QheaderView 继承,我如何将 Qheaderview 附加到我的 tableview?

最佳答案

您可以使用 QTableView::setVerticalHeader() 设置 QTableView 的垂直和水平标题和 QTableView::setHorizontalHeader() , 分别。

关于c++ - 如何访问 QHeaderView::sectionsInserted 插槽,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19125564/

相关文章:

c++ - Curiously Recurring Template Pattern 的实现是特定的吗?

c++ - Qt metaObject->indexOfMethod 总是返回 -1

c++ - 错误 : 'Qt::ConnectionType' is not a class or namespace

C++ std::sort() 调用析构函数

c++ - C++ 中的宏参数求值

C++ 快速相等函数

c++ - 从 X : The readable size is Y bytes, 读取无效数据但可能读取 Z 字节

c++ - Linux 和 macOS 没问题,但 Windows 构建会抛出链接器错误 LNK2019

c++ - QListWidget 项目一致定位问题

c++ - 在 QTableView 中适配列