QWidget Semi-transparent Background Color

From Qt Wiki
Revision as of 17:35, 14 January 2015 by Maintenance script (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

English Български

QWidget Semi-transparent Background Color

This code snippet shows how to make the background color of QWidget [qt.io] semi-transparent by overloading paintEvent() [qt.io].

  • Declare overload of paintEvent

.h file

  • Implement the overload of paintEvent

.cpp file

The code snippet is inspired by solution proposed by Antonio Di Monaco at this forum thread [developer.qt.nokia.com].

See Also

How to Change the Background Color of QWidget [qt.io]

Categories: