can you pls provide me some code??
I have created a new class
#include <QtGui>
#include <QDebug>
Q_OBJECT
public:
setStyleSheet( "Frame{ background-image: url(plasma.png); }" );
}
protected:
p.drawLine( rect().topLeft(), rect().bottomRight() );
p.drawText( rect().center(), "works!" );
}
};
#include <QtGui>
#include <QDebug>
class Frame : public QFrame{
Q_OBJECT
public:
Frame( QWidget * parent = NULL ) : QFrame(parent){
setStyleSheet( "Frame{ background-image: url(plasma.png); }" );
}
protected:
void paintEvent( QPaintEvent * event ){
QFrame::paintEvent(event);
QPainter p(this);
p.drawLine( rect().topLeft(), rect().bottomRight() );
p.drawText( rect().center(), "works!" );
}
};
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)
Bookmarks