On Thu, Jun 14, 2007 at 04:02:07PM +0000, Andreas Vox wrote:
> Leuven, E. <[EMAIL PROTECTED]> writes:
> 
> > 
> > > Maybe you just forgot to relaunch CMake so that MyStyle.cpp is
> > > included in your MSVC project (or Makefile)?
> > 
> > if i subclass QWindowsStyle then things are ok (but i don 't think the mac
> people are gonna like this ... 
> > 
> 
> Maybe not, from Qt4.3 docs:
> 
> | The QMacStyle class provides a Mac OS X style using the Apple Appearance 
> | Manager. More...
> | 
> |  #include <QMacStyle>
> | 
> | Inherits QWindowsStyle.
> | 
> 
> 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);
> }
> 
> ....
> } // class StyleAdapter

Good idea actually.

Andre'

Reply via email to