diff options
Diffstat (limited to 'tools/designer/src/lib/shared/stylesheeteditor.cpp')
-rw-r--r-- | tools/designer/src/lib/shared/stylesheeteditor.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/designer/src/lib/shared/stylesheeteditor.cpp b/tools/designer/src/lib/shared/stylesheeteditor.cpp index b76d700..bee5210 100644 --- a/tools/designer/src/lib/shared/stylesheeteditor.cpp +++ b/tools/designer/src/lib/shared/stylesheeteditor.cpp @@ -79,6 +79,7 @@ StyleSheetEditor::StyleSheetEditor(QWidget *parent) : QTextEdit(parent) { setTabStopWidth(fontMetrics().width(QLatin1Char(' '))*4); + setAcceptRichText(false); new CssHighlighter(document()); } @@ -393,14 +394,14 @@ StyleSheetPropertyEditorDialog::StyleSheetPropertyEditorDialog(QWidget *parent, qt_extension<QDesignerPropertySheetExtension*>(m_fw->core()->extensionManager(), m_widget); Q_ASSERT(sheet != 0); const int index = sheet->indexOf(QLatin1String(styleSheetProperty)); - const PropertySheetStringValue value = qVariantValue<PropertySheetStringValue>(sheet->property(index)); + const PropertySheetStringValue value = qvariant_cast<PropertySheetStringValue>(sheet->property(index)); setText(value.value()); } void StyleSheetPropertyEditorDialog::applyStyleSheet() { const PropertySheetStringValue value(text(), false); - m_fw->cursor()->setWidgetProperty(m_widget, QLatin1String(styleSheetProperty), qVariantFromValue(value)); + m_fw->cursor()->setWidgetProperty(m_widget, QLatin1String(styleSheetProperty), QVariant::fromValue(value)); } } // namespace qdesigner_internal |