[Interest] QTextEdit and Style sheets

Bill Crocker william.crocker at analog.com
Mon Mar 12 14:31:54 CET 2012

On 03/12/2012 09:12 AM, Graham Labdon wrote:
> 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
> Any other ideas?

I resolve most of my Qt problems by tracing execution through the source.
Sometimes I find a bug that needs to be fixed.
Sometimes I come to an understand of how I am using it wrong.


> *From:*interest-bounces+graham.labdon=avalonsciences.com at qt-project.org
> [mailto:interest-bounces+graham.labdon=avalonsciences.com at qt-project.org] *On
> Behalf Of *Jason H
> *Sent:* 12 March 2012 12:23
> *To:* interest at qt-project.org; graham.labdon at hotmail.co.uk
> *Subject:* Re: [Interest] QTextEdit and Style sheets
> 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.
> 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()
> -J
> --------------------------------------------------------------------------------
> *From: *graham labdon <graham.labdon at hotmail.co.uk
> <mailto:graham.labdon at hotmail.co.uk>>;
> *To: *<interest at qt-project.org <mailto:interest at qt-project.org>>;
> *Subject: *[Interest] QTextEdit and Style sheets
> *Sent: *Mon, Mar 12, 2012 10:03:30 AM
> Hi
> I am trying to set a background image on a QTextEdit using setStyleSheet -
> textEdit->setStyleSheet(QString::fromUtf8("background-image:url(:/images/Chrysanthemum.png);background-attachment:fixed"));
> However, this doe not work.
> Am i misunderstanding the documentation or is it not possible?
> Thanks

More information about the Interest mailing list