WPasswordEdit doesn't work
Added by Flavio Lo Piccolo 5 days ago
When I try to get data from form field WPasswordEdit with method valueText, it return me an empty string.
Replies (3)
RE: WPasswordEdit doesn't work - Added by Flavio Lo Piccolo 5 days ago
Flavio Lo Piccolo wrote:
When I try to get data from form field WPasswordEdit with method valueText, it return me an empty string.
I use wt 4.13.1
RE: WPasswordEdit doesn't work - Added by Romain Mardulyn 4 days ago
Hello Flavio,
valueText() is working fine for me.
I would be happy to help you, but it is difficult to determine why it isn't working with so little information. Maybe you could share a snippet of your code or give a small example where you expect valueText() to return a value, but it returns an empty string instead.
RE: WPasswordEdit doesn't work - Added by Flavio Lo Piccolo 4 days ago
Hi,
here a snippet of my code:
[
void LoginPage::processInput()
{
error_->hide();
string u = username_->valueText().toUTF8();
string p = password_->valueText().toUTF8();
//string p = password_->text().toUTF8();
BLOG(severity::info) << u << " - " << p << endl;
return processLogin(u, p, false);
}
]
username_ is a WLineEdit and password_ is WPasswordEdit:
processInput start when user click on button login.
I want to specify that the valueText() method returns an empty string when the data is automatically populated by the browser. (Instead username_ is populated correctly).
I tryed other ways to get access to the object's content but nobody has worked for me.
At the end, I downloaded wt version 4.12.6 and the behaviur was restored. For this reasons i think this is a little bug.
I'm a young software developer and have no experience with forums, so I hope this information helps you and me.