Results 1 to 2 of 2

Thread: Read data from EditText from Javascript

  1. #1
    Join Date
    Sep 2011
    Posts
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Windows

    Default Read data from EditText from Javascript

    Hello
    I have a EditText which will be viewed in all screen of my Application. All my screen are based on QML and loaded in a Qt Frame
    At the start of my project i will set a value to the EditText. I need to get the value in the third screen for a Javascript File
    How can i read the value from the Editext using Javascript

    Is there any function like document.getElementById('label').value as in Javascript/HTMl

  2. #2
    Join Date
    Sep 2010
    Location
    Poland
    Posts
    112
    Thanks
    8
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default Re: Read data from EditText from Javascript

    I would suggest to save this value as the property
    Qt Code:
    1. property string name: "value"
    To copy to clipboard, switch view to plain text mode 
    and than you could access it like this , assume that you defined it in rectangle which id is "foo"
    Qt Code:
    1. foo.name
    To copy to clipboard, switch view to plain text mode 
    My schedule makes my cry
    My works makes my laugh
    My life makes... oh...no....

Similar Threads

  1. Pass data from QT to javascript function
    By thanhluanbk88 in forum Qt Programming
    Replies: 3
    Last Post: 3rd March 2011, 10:40
  2. Replies: 9
    Last Post: 29th November 2010, 12:12
  3. How to read and write data into the QTableView
    By grsandeep85 in forum Qt Programming
    Replies: 2
    Last Post: 20th October 2009, 12:31
  4. can`t read a binary data!
    By blm in forum Qt Programming
    Replies: 8
    Last Post: 18th September 2008, 16:56
  5. How to change Text colour in EditText?
    By phillip_Qt in forum Qt Programming
    Replies: 6
    Last Post: 6th March 2008, 08:48

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.