Commit 910066ea authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.propertyEditor: closing expression editing on enter/return

parent 3300a1c2
...@@ -45,10 +45,9 @@ QWidget { ...@@ -45,10 +45,9 @@ QWidget {
} }
QTextEdit { ExpressionEdit {
id: textEdit; id: textEdit;
styleSheet: "QTextEdit {border-radius: 0px;}" styleSheet: "QTextEdit {border-radius: 0px;}"
acceptRichText: false;
documentTitle: "Expression" documentTitle: "Expression"
width: expressionEdit.width width: expressionEdit.width
...@@ -60,10 +59,12 @@ QWidget { ...@@ -60,10 +59,12 @@ QWidget {
if (!focus) if (!focus)
expressionEdit.active = false; expressionEdit.active = false;
} }
onReturnPressed: {
expressionEdit.backendValue.expression = textEdit.plainText;
expressionEdit.active = false;
}
} }
QPushButton { QPushButton {
focusPolicy: "Qt::NoFocus"; focusPolicy: "Qt::NoFocus";
y: expressionEdit.height - 22; y: expressionEdit.height - 22;
......
...@@ -53,7 +53,7 @@ QLineEdit ...@@ -53,7 +53,7 @@ QLineEdit
stop: 0 #2c2c2c, stop: 1 #333333); stop: 0 #2c2c2c, stop: 1 #333333);
} }
QTextEdit QPlainTextEdit
{ {
border: 2px solid #0F0F0F; border: 2px solid #0F0F0F;
border-radius: 6px; border-radius: 6px;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment