QLineEdit doesn't work
I'm making Koto fingering plugin.
Koto is Japanese traditional 13 strings zither.
Tuning depends on the song.
So I've decided to enter the numeric relative pitch.
Like
0,3,5,6,10,12,15,17,18,22,24,27,29
by the QLineEdit class.
But Javascript can't receive the signal from QlineEdit.
The following example always prints "undefined =undefined".
Help me please!
I'm new to Qt and Javascript.
---koto.js (part)---
function accept(){
...
var inputLine = form.lineEdit.value;
// var inputLine = form.lineEdit.planeText;
var text1 = new Text(curScore);
if (typeof inputLine == 'undefined') text1.text="undefined ="+inputLine;
currentCursor.putStaffText(text1);
...
}
---koto.ui (part)---
<widget class="QLineEdit" name="lineEdit">
<property name="enabled">
<bool>true</bool>
</property>
<property name="inputMask">
<string/>
</property>
<property name="text">
<string>0,3,5,6,10,12,15,17,18,22,24,27,29</string>
</property>
<property name="maxLength">
<number>90>/number>
</property>
</widget>
...
Comments
try
if (typeof inputLine === 'undefined') text1.text="undefined ="+inputLine;
i.e. 3 '='
In reply to try if (typeof inputLine === by Jojo-Schmitz
Thank you.
But result was the same.
I've attached the sample file.
In reply to Thank you. But result was the by tcbnhrs
use
var inputLine = form.lineEdit.text;
i.e. text vs. value
In reply to use var inputLine = by Jojo-Schmitz
Thank you, you are right.
And Sorry, I was confused.
"text" was mistake, "value" was correct.
In the attached file I've used
var inputLine = form.lineEdit.text;
I will complete the Koto fingering plug-in in near future.