I need some help again. There is some big project (created using Qt4) which I try to run with using Qt5. As you know QWindowStyle has removed in Qt5 but one function were used it. I replaced it with QProxyStyle but it didn't help.
Compiler says QProxyStyle::drawComplexControl Illegal call to non-static member function
It worked with Qt4 why it doesn't work here? Or use QProxyStyle is not good idea?
Heres some code
.h file class declaration
class MultiAxesPlot::LegendStyle:public QStyle
{
Q_OBJECT
public:
LegendStyle( LegendStyle const &other){}
LegendStyle(){}
~LegendStyle(){}
virtual void drawComplexControl( ComplexControl control, const QStyleOptionComplex * option, QPainter * painter, const QWidget * widget = 0 ) const;
};
problem function
void MultiAxesPlot::LegendStyle::drawComplexControl( ComplexControl control, const QStyleOptionComplex * option, QPainter * painter, const QWidget * widget /*= 0 */ ) const
{
if( option->type == QStyleOption::SO_TitleBar )
{
//some stuff
return;
}
QProxyStyle::drawComplexControl( control, option, painter, widget );
//QWindowStyle:drawComplexControl( control, option, painter, widget ); how it looked like before
}
QProxyStyleand notQStyle. - thugaQStylewithQProxyStylelikebase class undefinedand it not recognizeComplexControlparam - DanilGholtsmanbase class undefinedusually means that you have circular dependency somewhere. - thuga