Skip to content

Instantly share code, notes, and snippets.

@diorahman
Created June 11, 2012 07:59
Show Gist options
  • Save diorahman/2908998 to your computer and use it in GitHub Desktop.
Save diorahman/2908998 to your computer and use it in GitHub Desktop.
Enable parent paintEvent from subclass-ed QWidget
void myclass::paintEvent(QPaintEvent *pe) {
QStyleOption o;
o.initFrom(this);
QPainter p(this);
style()->drawPrimitive(QStyle::PE_Widget, &o, &p, this);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment