DialogButtonBoxButtonsHaveIcons,
UseFullScreenForPopupMenu,
KeyboardScheme,
- UiEffects
+ UiEffects,
+ SpellCheckUnderlineStyle
};
enum DialogType {
#include <QtCore/QVariant>
#include <QtCore/QStringList>
#include <qpalette.h>
+#include <qtextformat.h>
QT_BEGIN_NAMESPACE
\value UiEffects (int) A flag value consisting of UiEffect values specifying the enabled UI animations.
+ \value SpellCheckUnderlineStyle (int) A QTextCharFormat::UnderlineStyle specifying
+ the underline style used misspelled words when spell checking.
+
\sa themeHint(), QStyle::pixelMetric()
*/
return QVariant(int(WindowsKeyboardScheme));
case UiEffects:
return QVariant(int(0));
+ case SpellCheckUnderlineStyle:
+ return QVariant(int(QTextCharFormat::SpellCheckUnderline));
}
return QVariant();
}
#include "qstatictext.h"
#include "qglyphrun.h"
+#include <qpa/qplatformtheme.h>
+
#include <private/qfontengine_p.h>
#include <private/qpaintengine_p.h>
#include <private/qemulationpaintengine_p.h>
const qreal underlinePos = pos.y() + qCeil(underlineOffset);
if (underlineStyle == QTextCharFormat::SpellCheckUnderline) {
- underlineStyle = QTextCharFormat::SpellCheckUnderline; // ### Qt5 QTextCharFormat::UnderlineStyle(QApplication::style()->styleHint(QStyle::SH_SpellCheckUnderlineStyle));
+ QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme();
+ if (theme)
+ underlineStyle = QTextCharFormat::UnderlineStyle(theme->themeHint(QPlatformTheme::SpellCheckUnderlineStyle).toInt());
}
if (underlineStyle == QTextCharFormat::WaveUnderline) {