]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModuleBase/ModuleBase_WidgetAction.cpp
Salome HOME
Wrap tool tip text by word in Widget action
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetAction.cpp
index f63455d18824431da9640463496ae2211e7239f9..3d9c616ff29a36e9b52fa4bc2e0f1fc6b083c1c5 100755 (executable)
@@ -13,6 +13,8 @@
 #include <QHBoxLayout>
 #include <QToolButton>
 
+#define DEFAULT_TOOL_TIP_WIDTH 300
+
 ModuleBase_WidgetAction::ModuleBase_WidgetAction(QWidget* theParent,
                                                  const Config_WidgetAPI* theData)
 : ModuleBase_ModelWidget(theParent, theData)
@@ -24,8 +26,8 @@ ModuleBase_WidgetAction::ModuleBase_WidgetAction(QWidget* theParent,
   setAttributeID("");
 
   QString aText = QString::fromStdString(theData->widgetLabel());
-  QString aToolTip = ModuleBase_Tools::wrapToolTipByWords(
-                        QString::fromStdString(theData->widgetTooltip()), myButton);
+  QString aToolTip = ModuleBase_Tools::wrapTextByWords(
+              QString::fromStdString(theData->widgetTooltip()), myButton, DEFAULT_TOOL_TIP_WIDTH);
 
   myButton = new QToolButton(this);
   myButton->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);