giowck
18th August 2010, 09:22
Hi,
I have a QTextEdit which has HTML code with CSS properties, all works fine except images backgrounds...
myTextEdit->setHtml(
"<html>"
"<head>"
"<style type='text/css'>"
"body { background-image: url(:/images/plate.png); }"
"</style>"
"</head>"
"<body>"
"<h1>Hello World!</h1>"
"</body></html>"
);
This: background-image: url(:/images/plate.png); doesn't work as expected...
Am i doing something wrong? I want to set a background image from resource file to a specific html element.... So the <body> is just a test...
ps. i want to use CSS in html not the Qt Style Sheet system, because i need to style html elements!
Any suggestion? Thanks
I have a QTextEdit which has HTML code with CSS properties, all works fine except images backgrounds...
myTextEdit->setHtml(
"<html>"
"<head>"
"<style type='text/css'>"
"body { background-image: url(:/images/plate.png); }"
"</style>"
"</head>"
"<body>"
"<h1>Hello World!</h1>"
"</body></html>"
);
This: background-image: url(:/images/plate.png); doesn't work as expected...
Am i doing something wrong? I want to set a background image from resource file to a specific html element.... So the <body> is just a test...
ps. i want to use CSS in html not the Qt Style Sheet system, because i need to style html elements!
Any suggestion? Thanks