Qt QTableWidget右键菜单连接信号槽后无效

还需打开开关:

setContextMenuPolicy(Qt::CustomContextMenu);

connect(this, &TableWidget::customContextMenuRequested, this, &TableWidget::showContextMenu);

posted @ 2024-04-02 17:58  远方是什么样子  阅读(36)  评论(0编辑  收藏  举报