<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi,<br>
<br>
Your current width is 0 (so thats why its hidden), you need to set width for example like:<br>
<br>
<span style=" color:#c0c0c0;"></span><font face="Courier New"><span style=" color:#800080;">TextField</span> {
</font>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><font face="Courier New"><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">y</span>:<span style=" color:#c0c0c0;"> </span>100</font></pre>
<font face="Courier New"></font>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><font face="Courier New"><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">width</span>:<span style=" color:#c0c0c0;"> </span><span style=" font-style:italic; color:#000000;">parent</span>.width</font></pre>
<font face="Courier New"></font>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><font face="Courier New"><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">focus</span>:<span style=" color:#c0c0c0;"> </span>true</font></pre>
<font face="Courier New"></font>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><font face="Courier New"><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">placeholderText</span>:<span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">"Please</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">enter</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">the</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">answer</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">here"</span></font></pre>
<font face="Courier New"></font>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><font face="Courier New"><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">inputMethodHints</span>:<span style=" color:#c0c0c0;"> </span><span style=" font-style:italic; color:#0055af;">Qt</span>.ImhDigitsOnly</font></pre>
<font face="Courier New"></font>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><font face="Courier New"><span style=" color:#c0c0c0;"> </span>}</font><br>And inputMethodHints starts with lowercase i. But on current version of SDK it currently does nothing. <br>You need to wait for next SDK release where it has been fixed.<br><br>re, Jonni<br></pre>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF260431"><font color="#000000" face="Tahoma" size="2"><b>From:</b> devel-bounces@lists.sailfishos.org [devel-bounces@lists.sailfishos.org] on behalf of Superpelican [superpelican@zoho.com]<br>
<b>Sent:</b> Saturday, April 27, 2013 8:03 PM<br>
<b>To:</b> devel@lists.sailfishos.org<br>
<b>Subject:</b> [SailfishDevel] TextField Silica Component's placeholderText property doesn't work<br>
</font><br>
</div>
<div></div>
<div>
<p>Hello fellow mailing list members, <br>
<br>
I'm reasonably new to programming and Qt/QML. <br>
I know the basics of C++ and QML. And I'm <br>
trying to create simple Sailfish OS QML/C++ app. <br>
<br>
I've already written a CLI version of my application in C++ <br>
that contains the logic. So I will use that code as base for my Saifish app. <br>
<br>
I'm now creating the QML/Silica UI and the UI includes a single line TextField component for entering integers. However I noticed that placeholderText isn't shown, which makes it almost impossible for the user to see theTextField. When I set the text property
of the TextField I can however see the text in the emulator. The relevant code basically looks like this:
<br>
<br>
TextField{ <br>
x: parent.Center <br>
y: 100 <br>
focus: true <br>
placeholderText: "Please enter the answer here" <br>
InputMethodHints: Qt.ImhDigitsOnly <br>
} <br>
<br>
Also it seems that the InputMethodHint also doesn't work: I just get a general keyboard. No special digits only keypad, it doesn't even start on the number/special character tab of the keyboard.
<br>
<br>
Are these things Silica Component bugs?</p>
</div>
</div>
</div>
</body>
</html>