QWidget Semi-transparent Background Color: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
(No difference)

Revision as of 17:35, 14 January 2015

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: