Op 13-3-2012 16:45, Graham Labdon schreef:
Hi everyone
Solved this!
edit->setStyleSheet("background-image:url(:/images/bg.jpg)");
QPalettepalette=edit->palette();
palette.setBrush(QPalette::Base,Qt::NoBrush);
edit->setPalette(palette);
Please report this as a bug. I think that setting a background image
should already set the brush to NoBrush, or the rendering should be done
the other way around. Either way, that would qualify as a Qt bug IMO.
André
*From:*interest-bounces+graham.labdon=avalonsciences....@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences....@qt-project.org]
*On Behalf Of *Graham Labdon
*Sent:* 13 March 2012 10:06
*To:* Graham Labdon; Tony Rietwyk
*Cc:* interest@qt-project.org
*Subject:* Re: [Interest] QTextEdit and Style sheets
Hi everyone
There seems to be a bug with setting a background image in QTextEdit
under windows --
This line of code does not work -
edit->setStyleSheet(background-image:url(:/images/bg.jpg)");
However, this does (NB the background color is not shown as red)
edit->setStyleSheet("background-color: red;background-image:
url(:/images/bg.jpg)");
Can anyone please confirm this?
Thanks
*From:*interest-bounces+graham.labdon=avalonsciences....@qt-project.org <mailto:interest-bounces+graham.labdon=avalonsciences....@qt-project.org>
[mailto:interest-bounces+graham.labdon=avalonsciences....@qt-project.org]
<mailto:[mailto:interest-bounces+graham.labdon=avalonsciences....@qt-project.org]>
*On Behalf Of *Graham Labdon
*Sent:* 13 March 2012 08:57
*To:* Tony Rietwyk
*Cc:* interest@qt-project.org <mailto:interest@qt-project.org>
*Subject:* Re: [Interest] QTextEdit and Style sheets
This has me confused
I can successfully set the background image under Linux, but not under
Windows7
Is there anyone out there who could verify that they can set a
background image on a QTextEdit under Windows7
Thanks
Graham
*From:*interest-bounces+graham.labdon=avalonsciences....@qt-project.org <mailto:interest-bounces+graham.labdon=avalonsciences....@qt-project.org>
[mailto:interest-bounces+graham.labdon=avalonsciences....@qt-project.org]
<mailto:[mailto:interest-bounces+graham.labdon=avalonsciences....@qt-project.org]>
*On Behalf Of *Tony Rietwyk
*Sent:* 12 March 2012 23:40
*To:* interest@qt-project.org <mailto:interest@qt-project.org>
*Subject:* Re: [Interest] QTextEdit and Style sheets
Hi Graham,
Have you tried using url(qrc:/images/Chrysanthemum.png) ?
Sorry, I can't find a help reference for this.
Tony.
*From:*interest-bounces+tony=rightsoft.com...@qt-project.org
<mailto:interest-bounces+tony=rightsoft.com...@qt-project.org>
[mailto:interest-bounces+tony=rightsoft.com...@qt-project.org]
<mailto:[mailto:interest-bounces+tony=rightsoft.com...@qt-project.org]> *On
Behalf Of *graham labdon
*Sent:* Monday, 12 March 2012 9:04 PM
*To:* interest@qt-project.org <mailto:interest@qt-project.org>
*Subject:* [Interest] QTextEdit and Style sheets
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
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest