Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

Semi-transparent QTextEdit

$
0
0
Hi all, I’ve been trying to get a QTextEdit control to draw its background semi-transparently, but to no avail. I’ve lost count on the number of different methods I’ve tried: setting the palette, both to the QTextEdit control itself, and to the viewport() (i.e. a Palette with colors for both QPalette::Base and QPalette::Background set to RGBA colors) calling control->setStyleSheet with background set to “none” this method:    control->setAttribute( Qt::WA_TranslucentBackground, true ); and this: control->viewport()->setAutoFillBackground(false); and finally this: QGraphicsOpacityEffect* effect = new QGraphicsOpacityEffect( control ); effect->setOpacity( 0.75 ); control->setGraphicsEffect( effect ); and of course a number of combinations of some or all of these methods but nothing works. A thing to note is that I’m NOT adding this control to a layout, since it is absolutely positioned on top of other windows. I’m currently on page 3 in the Google search, will continue to go deeper. Any ideas? Regards, Daniel

Viewing all articles
Browse latest Browse all 18427

Trending Articles