Hello everyone,
I want to create my own Style, so I created a class which inherits QStyle. This class does till now nothing

Qt Code:
  1. //MyStyleClass.h
  2. class MyStyle : public QStyle
  3. {
  4. Q_OBJECT
  5. public:
  6. MyStyle();
  7.  
  8. void polish(QPalette &palette);
  9. }
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. //MyStyleClass.cpp
  2. MyStyle::MyStyle()
  3. {
  4. }
  5.  
  6. void MyStyle::polish(QPalette &palette)
  7. {
  8. }
To copy to clipboard, switch view to plain text mode 

My test programm is just a dialog box with a button assigned. But how can I assign the new Style to my programm?
I tried it out in the main() function via:
Qt Code:
  1. QApplication::setStyle(new MyStyle);
To copy to clipboard, switch view to plain text mode 
but I just get an error from the compiler which says:
cannot allocate an object of abstract type 'MyStyle'
because the following virtual functions are pure within 'MyStyle':
virtual void QStyle::drawPrimitive(QStyle::PrimitiveElements, const QStyleOption*, QPainter*, const Qwidget*) const;

and a lot more functions