+ 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());
+ aButton->setShortcut(aKeys);
+ }
+ if (!aToolTip.isEmpty()) {
+ aButton->setToolTip(aToolTip);
+ }
+ aButton->setCheckable(myCheckable);
+ aButton->setAutoRaise(true);
+ aButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
+ aButton->setMinimumSize(MIN_BUTTON_WIDTH, MIN_BUTTON_HEIGHT);
+ aButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+
+ connect(aButton, SIGNAL(clicked()), this, SLOT(trigger()));
+ connect(this, SIGNAL(toggled(bool)), aButton, SLOT(setChecked(bool)));
+ this->setCheckable(myCheckable);
+
+ return aButton;
+ }
+ return QWidgetAction::createWidget(theParent);