15 #ifndef SV_MENU_TITLE_H 16 #define SV_MENU_TITLE_H 21 #include <QWidgetAction> 23 #include <QApplication> 32 static int leftIndent =
34 qApp->style()->pixelMetric(QStyle::PM_SmallIconSize));
37 static int leftIndent =
38 (9 + qApp->style()->pixelMetric(QStyle::PM_SmallIconSize));
40 static int leftIndent = 16;
44 QWidgetAction *wa =
new QWidgetAction(m);
45 QLabel *title =
new QLabel;
46 title->setText(QObject::tr(
"<b>%1</b>")
47 .arg(XmlExportable::encodeEntities(text)));
49 title->setIndent(leftIndent);
50 wa->setDefaultWidget(title);
static int scalePixelSize(int pixels)
Take a "design pixel" size and scale it for the actual display.