widgets snippets: remove unreferenced snippets
They were using QStyleOption*V<N>, which are all obsolete since Qt 5.0. Change-Id: I6a8a666cf18d52fcac8f305f38c8ef0843ec7bfd Reviewed-by: Topi Reiniö <topi.reinio@digia.com>bb10
parent
1c9f53c4e5
commit
595d6797be
|
|
@ -75,44 +75,11 @@ void MyPushButton::paintEvent(QPaintEvent *)
|
|||
class MyStyle : public QStyle
|
||||
{
|
||||
public:
|
||||
MyStyle();
|
||||
|
||||
void drawPrimitive(PrimitiveElement element, const QStyleOption *option,
|
||||
QPainter *painter, const QWidget *widget);
|
||||
};
|
||||
|
||||
MyStyle::MyStyle()
|
||||
{
|
||||
//! [1]
|
||||
QStyleOptionFrame *option;
|
||||
|
||||
if (const QStyleOptionFrame *frameOption =
|
||||
qstyleoption_cast<const QStyleOptionFrame *>(option)) {
|
||||
QStyleOptionFrameV2 frameOptionV2(*frameOption);
|
||||
|
||||
// draw the frame using frameOptionV2
|
||||
}
|
||||
//! [1]
|
||||
|
||||
//! [2]
|
||||
if (const QStyleOptionProgressBar *progressBarOption =
|
||||
qstyleoption_cast<const QStyleOptionProgressBar *>(option)) {
|
||||
QStyleOptionProgressBarV2 progressBarV2(*progressBarOption);
|
||||
|
||||
// draw the progress bar using progressBarV2
|
||||
}
|
||||
//! [2]
|
||||
|
||||
//! [3]
|
||||
if (const QStyleOptionTab *tabOption =
|
||||
qstyleoption_cast<const QStyleOptionTab *>(option)) {
|
||||
QStyleOptionTabV2 tabV2(*tabOption);
|
||||
|
||||
// draw the tab using tabV2
|
||||
}
|
||||
//! [3]
|
||||
}
|
||||
|
||||
//! [4]
|
||||
void MyStyle::drawPrimitive(PrimitiveElement element,
|
||||
const QStyleOption *option,
|
||||
|
|
|
|||
Loading…
Reference in New Issue