Add button to QTableWidget cell alongside with entry

让人想犯罪 __ 提交于 2019-12-11 04:39:37

问题


I have a QTableWidget and one column of it is for specifying file path. I want to provide user with two options, writing the path, or specifying it using QFileDialog. When I added a button as cell widget, it covered whole cell and the entry disappeared.

QPushButton *browseButton = new QPushButton("...", tableWidget);
tableWidget->setCellWidget(rowCount, 3, browseButton);

How can I insert QPushButton or QAction with QIcon alongside with entry?

来源:https://stackoverflow.com/questions/16711404/add-button-to-qtablewidget-cell-alongside-with-entry

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!