<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:EN-GB;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I realise that using the colon implies a compilied in resource but this resource exits and can be used to set the background image on a push button<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Any other ideas?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> interest-bounces+graham.labdon=avalonsciences.com@qt-project.org
 [mailto:interest-bounces+graham.labdon=avalonsciences.com@qt-project.org] <b>On Behalf Of
</b>Jason H<br>
<b>Sent:</b> 12 March 2012 12:23<br>
<b>To:</b> interest@qt-project.org; graham.labdon@hotmail.co.uk<br>
<b>Subject:</b> Re: [Interest] QTextEdit and Style sheets<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="padding:0cm 0cm 0cm 0cm">
<p>You've understanding it fine. But the colon in the filename means, it's a complied-in resource. While you develop/test, I would suggest taking the colon out and using the file system.
<o:p></o:p></p>
<p style="margin-bottom:12.0pt">All you have to do without using style sheets is subclass QTextEdit then re implement draw, draw your water mark, then cal the base class paint via QTextEdit::paintEvent()<br>
<br>
<o:p></o:p></p>
<p>-J<o:p></o:p></p>
</td>
</tr>
</tbody>
</table>
<div id="_origMsg_">
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<div>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
<hr size="1" width="100%" align="center">
</span></div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:
</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">graham labdon <<a href="mailto:graham.labdon@hotmail.co.uk">graham.labdon@hotmail.co.uk</a>>;
<br>
<b>To: </b><<a href="mailto:interest@qt-project.org">interest@qt-project.org</a>>;
<br>
<b>Subject: </b>[Interest] QTextEdit and Style sheets <br>
<b>Sent: </b>Mon, Mar 12, 2012 10:03:30 AM </span><o:p></o:p></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="padding:0cm 0cm 0cm 0cm">
<div>
<p class="MsoNormal">Hi<br>
I am trying to set a background image on a QTextEdit using setStyleSheet -<br>
<br>
<span style="color:maroon">textEdit</span><span style="color:black">-></span>setStyleSheet<span style="color:black">(</span><span style="color:purple">QString</span><span style="color:black">::</span>fromUtf8<span style="color:black">(</span><span style="color:green">"background-image:</span><span style="color:silver">
</span><span style="color:green">url(:/images/Chrysanthemum.png);background-attachment:</span><span style="color:silver">
</span><span style="color:green">fixed"</span><span style="color:black">));</span><br>
<br>
However, this doe not work.<br>
<br>
Am i misunderstanding the documentation or is it not possible?<br>
<br>
Thanks<o:p></o:p></p>
</div>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
</div>
</div>
</div>
</div>
</body>
</html>