- if (theParent->inherits("XGUI_MenuGroupPanel")) {
- QPushButton* aBtn = new QPushButton(theParent);
- aBtn->setIcon(icon());
- aBtn->setText(text());
- QKeySequence aKeys = shortcut();
- QString aToolTip = toolTip();
- if (!aKeys.isEmpty())
- aToolTip = aToolTip + " (" + aKeys.toString() + ")";
- if (!aToolTip.isEmpty())
- aBtn->setToolTip(aToolTip);
-
- aBtn->addAction(this);
- connect(aBtn, SIGNAL(clicked()), this, SLOT(trigger()));
- aBtn->setFlat(true);
- aBtn->setMinimumSize(MIN_BUTTON_WIDTH, MIN_BUTTON_HEIGHT);
- return aBtn;
+ if (theParent->inherits("XGUI_MenuGroupPanel")) {
+ QToolButton* aButton = new QToolButton(theParent);
+ aButton->setIcon(icon());
+ aButton->setText(text());
+ QKeySequence aKeys = shortcut();
+ QString aToolTip = toolTip();
+ if (!aKeys.isEmpty()) {
+ aToolTip = QString("%1 (%2)").arg(aToolTip).arg(aKeys.toString());