Results 1 to 3 of 3

Thread: qt embedded , in webview,refresh code in javascript can't refresh comleted?

  1. #1
    Join Date
    Dec 2010
    Posts
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default qt embedded , in webview,refresh code in javascript can't refresh comleted?

    in application for qt embedded , i use webview controler to show a page .the html page will show date time persecond implemented by javascript code, but the page can't refresh completed ,only the up first half can be showed correctly, the down second half keep origin shape. i don't know how to resolve it.
    the html page code just like below:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>refresh datetime</title>
    <style type="text/css">
    #clock{
    font-size:36px;
    color:#0099CC;
    }
    </style>
    <script type="text/javascript">
    function nowTime(){
    var oNowTime=new Date()
    var iMonth=oNowTime.getMonth()
    var iDate=oNowTime.getDate()
    var iYear=oNowTime.getFullYear()
    var iHours=oNowTime.getHours()
    var iMinutes=oNowTime.getMinutes()
    var iSeconds=oNowTime.getSeconds()
    var iMilliSeconds=oNowTime.getMilliseconds()
    var sNowTime=iHours+":"+iMinutes+":"+iSeconds;
    return sNowTime
    }
    function nowDate(){
    var oNowTime=new Date()
    var iMonth=oNowTime.getMonth()+1
    var iDate=oNowTime.getDate()
    var iYear=oNowTime.getFullYear()
    var iHours=oNowTime.getHours()
    var iMinutes=oNowTime.getMinutes()
    var iSeconds=oNowTime.getSeconds()
    var iMilliSeconds=oNowTime.getMilliseconds()
    var sNowTime=iYear+"-"+iMonth+"-"+iDate;
    return sNowTime
    }
    function showNowTime(){
    var oObjId1=document.getElementById("mdate");
    oObjId1.innerHTML=nowDate();
    var oObjId2=document.getElementById("mclock");
    oObjId2.innerHTML=nowTime();
    setTimeout("showNowTime()",1000)
    }
    </script>
    </head>

    <body onload="showNowTime()">
    <font size="7">
    <div id="mdate">mdate</div>
    <div id="mclock">mclock</div>
    </font>

    </body>
    </html>
    Last edited by zou jacky; 22nd December 2010 at 16:59.

  2. #2
    Join Date
    Dec 2010
    Posts
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: qt embedded , in webview,refresh code in javascript can't refresh comleted?

    no one .....

  3. #3
    Join Date
    Dec 2010
    Posts
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: qt embedded , in webview,refresh code in javascript can't refresh comleted?

    please help

Similar Threads

  1. Refresh QSqlRelation
    By Banjo in forum Qt Programming
    Replies: 3
    Last Post: 23rd May 2018, 11:39
  2. Plot does not refresh
    By Mat12345 in forum Qwt
    Replies: 3
    Last Post: 21st October 2009, 23:45
  3. Refresh TableModel
    By abbapatris in forum Qt Programming
    Replies: 8
    Last Post: 7th March 2008, 14:55
  4. QTableView refresh
    By eleanor in forum Qt Programming
    Replies: 9
    Last Post: 6th October 2007, 19:00
  5. Refresh QDataTable
    By shamik in forum Qt Programming
    Replies: 25
    Last Post: 1st December 2006, 06:04

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.