0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-24 00:33:02 +03:00

QLineEdit has been changed to QPlainTextEdit in the variable editor dialog

This commit is contained in:
Arin Alexander 2019-03-11 23:30:03 +03:00
parent a045c4fd0c
commit 68411d8002
2 changed files with 6 additions and 18 deletions

View File

@ -76,8 +76,8 @@ void LRVariableDialog::showEvent(QShowEvent *)
ui->leName->setText(m_variableName); ui->leName->setText(m_variableName);
static int enumIndex = LimeReport::Enums::staticMetaObject.indexOfEnumerator("VariableDataType"); static int enumIndex = LimeReport::Enums::staticMetaObject.indexOfEnumerator("VariableDataType");
QMetaEnum enumerator = LimeReport::Enums::staticMetaObject.enumerator(enumIndex); QMetaEnum enumerator = LimeReport::Enums::staticMetaObject.enumerator(enumIndex);
if (!m_variableName.isEmpty()&&m_variablesContainer&&m_variablesContainer->containsVariable(m_variableName)){ if (!m_variableName.isEmpty()&&m_variablesContainer&&m_variablesContainer->containsVariable(m_variableName)){
ui->leValue->setText(m_variablesContainer->variable(m_variableName).toString()); ui->leValue->setPlainText(m_variablesContainer->variable(m_variableName).toString());
#ifdef HAVE_QT5 #ifdef HAVE_QT5
ui->cbbType->setCurrentText(enumerator.valueToKey(m_variablesContainer->variableDataType(m_variableName))); ui->cbbType->setCurrentText(enumerator.valueToKey(m_variablesContainer->variableDataType(m_variableName)));
#endif #endif
@ -120,5 +120,5 @@ void LRVariableDialog::accept()
QVariant LRVariableDialog::value() QVariant LRVariableDialog::value()
{ {
return ui->leValue->text(); return ui->leValue->toPlainText();
} }

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>328</width> <width>328</width>
<height>173</height> <height>222</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -38,7 +38,7 @@
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QLineEdit" name="leValue"/> <widget class="QPlainTextEdit" name="leValue"/>
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QLabel" name="lblType"> <widget class="QLabel" name="lblType">
@ -59,19 +59,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item> <item>
<widget class="QDialogButtonBox" name="buttonBox"> <widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation"> <property name="orientation">
@ -86,6 +73,7 @@
</widget> </widget>
<resources> <resources>
<include location="lrdatabrowser.qrc"/> <include location="lrdatabrowser.qrc"/>
<include location="lrdatabrowser.qrc"/>
</resources> </resources>
<connections> <connections>
<connection> <connection>