/// \param theValue a boolean value
/// \param theWidget a widget to know the font
/// \param theMaxLineInPixels a maximum line width in pixels
-MODULEBASE_EXPORT QString wrapToolTipByWords(const QString& theValue, QWidget* theWidget,
+MODULEBASE_EXPORT QString wrapTextByWords(const QString& theValue, QWidget* theWidget,
int theMaxLineInPixels = 150);
}
#include <QHBoxLayout>
#include <QToolButton>
+#define DEFAULT_TOOL_TIP_WIDTH 300
+
ModuleBase_WidgetAction::ModuleBase_WidgetAction(QWidget* theParent,
const Config_WidgetAPI* theData)
: ModuleBase_ModelWidget(theParent, theData)
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);