Popup widgets like menu and combo share a common look. How to give that look to a custom widget?

I tried reimplementing the paint event
Qt Code:
  1. def paintEvent(self, e):
  2. p = QPainter(self)
  3. option = QStyleOption()
  4. option.initFrom(QMenu())
  5. option.rect = self.rect()
  6. self.style().drawPrimitive(QStyle.PE_FrameMenu, option, p, self)
  7. self.style().drawPrimitive(QStyle.PE_PanelMenu, option, p, self)
To copy to clipboard, switch view to plain text mode 
But it isn't enough for styles like Oxygen or Bespin...

What am I missing?