Results 1 to 6 of 6

Thread: Fill input in QWebView

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Join Date
    Dec 2010
    Location
    Tarnów, Poland/Polska
    Posts
    14
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Fill input in QWebView

    Qt Code:
    1. doc = ui->webView->page()->mainFrame()->documentElement();
    2.  
    3. QWebElement login = doc.findFirst("input[id=\"login\"]");
    4. QWebElement password = doc.findFirst("input[id=\"password\"]");
    5. QWebElement password_conf = doc.findFirst("input[id=\"password_conf\"]");
    6. QWebElement answer = doc.findFirst("input[id=\"secret_a\"]");
    7. QWebElement recapatcha = doc.findFirst("input[id=\"recaptcha_response_field\"]");
    8.  
    9. login.setAttribute("value", ui->lineEdit->text());
    10. password.setAttribute("value", ui->lineEdit_2->text());
    11. password_conf.setAttribute("value", ui->lineEdit_2->text());
    12. answer.setAttribute("value", ui->lineEdit_3->text());
    13. recapatcha.setAttribute("value", ui->lineEdit_4->text());
    To copy to clipboard, switch view to plain text mode 

    I only fill inputs and I sumbit it by myself in QWebView. It hard to me, explain this what I want to do. But I belive you will understand me ;]

    EDIT:

    I think that I should use Requests to do it, am I on good way?
    Last edited by RzuF; 19th December 2010 at 12:33.

Similar Threads

  1. Replies: 8
    Last Post: 3rd September 2013, 09:51
  2. Socket buffer fill
    By navi1084 in forum Qt Programming
    Replies: 3
    Last Post: 31st August 2009, 12:25
  3. Fill mode using QPainter
    By lni in forum Qt Programming
    Replies: 7
    Last Post: 23rd March 2009, 18:03
  4. How to fill the grid with the color?
    By merry in forum Qt Programming
    Replies: 3
    Last Post: 18th June 2007, 11:10
  5. How to fill the blocks of the Grid one by one?
    By merry in forum Qt Programming
    Replies: 1
    Last Post: 6th June 2007, 12:20

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
  •  
Qt is a trademark of The Qt Company.