Thanks for the various hints.
I ended up sub-classing QMenu and then implemented my own paintEvent():
Qt Code:
  1. void
  2. JQLineTypeMenu::paintEvent(
  3. QPaintEvent* event
  4. )
  5. {
  6. QPainter p(this);
  7. QRegion emptyArea = QRegion(rect());
  8.  
  9. //draw the items that need updating..
  10. foreach ( QAction* action, actions() )
  11. {
  12. QRect adjustedActionRect = actionGeometry(action);
  13. if ( !event->rect().intersects(adjustedActionRect) )
  14. continue;
  15.  
  16. //set the clip region to be extra safe (and adjust for the scrollers)
  17. QRegion adjustedActionReg(adjustedActionRect);
  18. emptyArea -= adjustedActionReg;
  19. p.setClipRegion(adjustedActionReg);
  20.  
  21. initStyleOption(&opt, action);
  22. opt.rect = adjustedActionRect;
  23. drawMenuItem(&opt, &p, action);
  24. }
  25. ...
  26. }
  27. void
  28. JQLineTypeMenu::drawMenuItem(
  29. const QAction* action
  30. )
  31. {
  32. bool act = opt->state & QStyle::State_Selected;
  33. QBrush fill = opt->palette.brush(act ? QPalette::Highlight : QPalette::Button);
  34. p->fillRect(opt->rect, fill);
  35.  
  36. QPen linePen(static_cast<Qt::PenStyle>(action->data().toInt()));
  37. linePen.setWidth(3);
  38. linePen.setBrush(opt->palette.brush(act ? QPalette::HighlightedText : QPalette::ButtonText));
  39. p->setPen(linePen);
  40. p->drawLine(opt->rect.left(), opt->rect.center().y(), opt->rect.right(), opt->rect.center().y());
  41. }
To copy to clipboard, switch view to plain text mode 
The various actions in the menu held the different pen styles (using QAction::setData()). I then instanced my JQLineTypeMenu for the toolbar.
Note: if you need also the scrollbar and/or tear-off support then it is better creating a custom QWidget and insert instances of those in the menu through QActionWidget.
The whole Qt library is full of private data members that sometimes makes C++ deriving a big cut&paste exercise