PDA

View Full Version : how QTextEdit transparent to his parent window?



wesley
3rd March 2008, 08:16
I am using Qtopia 4.3.2 to implement a Ui.

on this window, there is a background image, how can i set the QTextEdit to transparent to his parent window, so that I can see the background image from the QTextEdit, like a QLable.

thanks...

jpn
3rd March 2008, 12:18
Use stylesheets (http://doc.trolltech.com/latest/stylesheet.html) or QPalette to change the background.

wesley
4th March 2008, 01:33
Use stylesheets (http://doc.trolltech.com/latest/stylesheet.html) or QPalette to change the background.


yeap, I had use QPalette to change the color property on designer.
But, whatever I change, It seems not work. when I set the background to BLACK, then it will
transparent to the desktop, not transparent to his parent window.

Can you explain this more clear ? thanks.... ^_^

wesley
5th March 2008, 01:59
ok, I had found out a way to fix this problem.

see the code below.



detailTextEdit->viewport()->setAutoFillBackground(false);


You should disable the viewport of text edit to auto fill background, but not text edit itself.

thanks for all you help.

emrares
16th September 2009, 07:23
ok, I had found out a way to fix this problem.

see the code below.



detailTextEdit->viewport()->setAutoFillBackground(false);


You should disable the viewport of text edit to auto fill background, but not text edit itself.

thanks for all you help.


10x alot man!!