can you pls provide me some code??

I have created a new class
Qt Code:
  1. #include <QtGui>
  2. #include <QDebug>
  3.  
  4. class Frame : public QFrame{
  5. Q_OBJECT
  6. public:
  7. Frame( QWidget * parent = NULL ) : QFrame(parent){
  8. setStyleSheet( "Frame{ background-image: url(plasma.png); }" );
  9. }
  10. protected:
  11. void paintEvent( QPaintEvent * event ){
  12. QFrame::paintEvent(event);
  13. QPainter p(this);
  14. p.drawLine( rect().topLeft(), rect().bottomRight() );
  15. p.drawText( rect().center(), "works!" );
  16. }
  17. };
To copy to clipboard, switch view to plain text mode 

I have drawn the line in the subclass frame. Now how can i promote the frame over my mainwindow(ui)