diff --git a/doric-Qt/example/doric/resources/text.qml b/doric-Qt/example/doric/resources/text.qml index 8aaa4410..6290c455 100644 --- a/doric-Qt/example/doric/resources/text.qml +++ b/doric-Qt/example/doric/resources/text.qml @@ -125,4 +125,16 @@ TextArea { } textFormat: TextEdit.AutoText + + property var strikethrough: false + + onStrikethroughChanged: { + font.strikeout = strikethrough + } + + property var underline: false + + onUnderlineChanged: { + font.underline = underline + } } diff --git a/doric-Qt/example/doric/shader/DoricTextNode.cpp b/doric-Qt/example/doric/shader/DoricTextNode.cpp index 7caec8ba..d8bdb205 100644 --- a/doric-Qt/example/doric/shader/DoricTextNode.cpp +++ b/doric-Qt/example/doric/shader/DoricTextNode.cpp @@ -65,6 +65,10 @@ void DoricTextNode::blend(QQuickItem *view, QString name, QJsonValue prop) { DoricLayouts *layout = (DoricLayouts *)(mView->property("doricLayout").toULongLong()); layout->setMaxHeight(prop.toDouble()); + } else if (name == "strikethrough") { + view->setProperty("strikethrough", prop.toBool()); + } else if (name == "underline") { + view->setProperty("underline", prop.toBool()); } else { DoricViewNode::blend(view, name, prop); }