|
|
2011-04-20
, 21:22
|
|
|
Posts: 2,448 |
Thanked: 9,523 times |
Joined on Aug 2010
@ Wigan, UK
|
#2
|
import QtQuick 1.0
import QtWebKit 1.0
WebView {
width: 800
height: 480
html : "<html><body><font color='white'>I like pie<br><br><br>piepiepie!</font></body></html>"
}

| The Following User Says Thank You to marxian For This Useful Post: | ||
|
|
2011-04-20
, 21:27
|
|
Posts: 82 |
Thanked: 214 times |
Joined on Jan 2010
@ Cape town
|
#3
|
Setting the HTML worked for me (in the QMLViewer), but I needed to insert a <font color='white'> tag:
Code:import QtQuick 1.0 import QtWebKit 1.0 WebView { width: 800 height: 480 html : "<html><body><font color='white'>I like pie<br><br><br>piepiepie!</font></body></html>" }
Running the following (be it from Python or qmlviewer directly) works great on both my desktop and my N900:
import Qt 4.7 import QtWebKit 1.0 Rectangle{ WebView { id: webView url: "http://www.google.co.za" width: 800 height: 480 //html: "<html><body>I LIKE PIE<br><br><br>PIEPIEPIE!</body></html>" } }import Qt 4.7 import QtWebKit 1.0 Rectangle{ WebView { id: webView //url: "http://www.google.co.za" width: 800 height: 480 html: "<html><body>I LIKE PIE<br><br><br>PIEPIEPIE!</body></html>" } }import Qt 4.7 import QtWebKit 1.0 Rectangle{ WebView { id: webView url: "file:///tmp/test.html" width: 800 height: 480 //html: "<html><body>I LIKE PIE<br><br><br>PIEPIEPIE!</body></html>" } }