0
從CommanLinkButtons連接各種信號
我已經把一些CommandLinkButtons一些環插入一個QTableWidget的:從QTableWidget的
QCommandLinkButton *MysticalButton = new QCommandLinkButton;
QueryReturn = ModHandling->ModuleXML("attribute",ModuleList.at(iMod),"Settings","Icon");
QIcon Icon(QueryReturn);
QSize IconSize;
IconSize.scale(48, 48, Qt::KeepAspectRatio);
MysticalButton->setIconSize(IconSize);
MysticalButton->setIcon(Icon);
QueryReturn = ModHandling->ModuleXML("search", ModuleList.at(iMod), "Title");
MysticalButton->setText(QueryReturn);
QueryReturn = ModHandling->ModuleXML("search", ModuleList.at(iMod), "Description");
MysticalButton->setStatusTip(QueryReturn);
// I use the Tooltip to get the Command of this Button:
QueryReturn = ModHandling->ModuleXML("search", ModuleList.at(iMod), "Exec");
MysticalButton->setToolTip(QueryReturn);
ui->tableWidget_Main->setCellWidget(iRow, iCol, MysticalButton);
我如何把信號連接到將從按鈕執行命令插槽?該命令設置爲工具提示btw。
如果你知道一個更好的方式來設置命令按鈕,那麼請讓我知道(=