Andreas Vox wrote:
QStyle is an abstract class, you should either subclass QMacStyle,
QWindowsStyle, or QCommonStyle, or delegate all calls to another style.

Eg.

class QStyleAdapter : public QStyle
{
public QStyleAdapter(const QStyle* delegate) : QStyle(), m_delegate(delegate) {}

int pixelMetric(PixelMetric metric, const QStyleOption * option, const QWidget *
widget) const
{
        return m_delegate->pixelMetric(metric, option, widget);
}

....

but these dots mean that i need to implement all methods in qstyle to call the delegate equivalent right?

that's a lot of work to work around what seems like a qt bug to me (the bottom two likes of the tear-off are not drawn)

menu->setStyleSheet("padding-top: 2px");

shows them, but then i loos the frame, sigh...

another qt bug is that resizing the torn-off menu's hides the contents.

i think i am gonna leave this as it is.

...

people do we want this in? it works on linux and windows.


Reply via email to