I discovered that I needed two specific lines in my QML to run WebView on my 
N900, like this:

import Qt 4.7
import QtWebKit 1.0

Item {
Rectangle {
    height:30
    color:"red"
    width:parent.width
    anchors.top : parent.top
    id:red
}
WebView {
anchors.top:red.bottom
anchors.bottom:yellow.top
                
url:"http://nokia.com";
}
Rectangle {
    id:yellow
    height:30
    color:"yellow"
    width:parent.width
    anchors.bottom : parent.bottom
}
}

Thanks.

This means that I can't run on my desktop PC without remembering to change back 
to

import org.webkit 1.0

but I can live with that.

Though I can bring up WebView without crashing now, I am still unable to get a 
web page to load from a URL, though I've just begun trying to find the problem 
in the above.  I am able to successfully use embedded HTML, as in :

WebView {
    html:"\
        <body bgcolor=white>\
        <table border=1>\
            <tr><th><th>One<th>Two<th>Three\
            <tr><th>1<td>X<td>1<td>X\
            <tr><th>2<td>0<td>X<td>0\
            <tr><th>3<td>X<td>1<td>X\
        </table>"
}

When I load from a URL, I just get a cross-hatched pattern for the page unless 
it is a very short page, in which case I get a cross-hatched pattern at the top 
and whitespace underneath.  I guess this indicates that it really is loading 
the page, but for some reason is not rendering correctly on the screen.  I'll 
see if I can figure this out.

Thanks for the help.
Bruce
_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-qml

Reply via email to