问题
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