On Tuesday, 7 June 2016 19:27:18 WEST René J.V. Bertin wrote: > Hi, > > I'm modifying a QStyle so that it uses the Unicode "check mark" glyph for > checked menu items, because that I think should give a nice visual unity > between the item text and the mark, both in style and in size (= when users > select a really large font). > > The problem is that when I make horizontal space for the tick at large font > sizes (say 32pt), the menu becomes too narrow. From what I understand, > QStyle::drawPrimitive is called with PE_PanelMenu when the (popup) menu > backdrop is to be drawn. > > What I'm not getting around is the fact that there appears to be some > higher-priority clipping that prevents me from extending the right border. > This also applies to the item text itself; it is clipped even if I give it > an amply wide bounding rectangle.
How are you setting this bounding rectangle ? Have you tried reimplementing QStyle::sizeFromContents() and handling QStyle::CT_Menu ? Regards, Sérgio Martins _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest