I've put some CommandLinkButtons with some loops into a 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);
How do i connect a Signal to a Slot which will execute the Command from the Button? The Command is set as ToolTip btw.
If you know a better way to set the command to the button then please let me know (=