diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-11-02 15:39:47 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-11-02 18:43:30 +0000 |
commit | 595d6797beab5f4275b4e544c9683a99b48f4801 (patch) | |
tree | 160ec622e3f096860636271563c1a6787b8ef756 /src/widgets/doc/snippets/qstyleoption/main.cpp | |
parent | 1c9f53c4e55090be6db48962705a4e01db5b3109 (diff) |
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>
Diffstat (limited to 'src/widgets/doc/snippets/qstyleoption/main.cpp')
-rw-r--r-- | src/widgets/doc/snippets/qstyleoption/main.cpp | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/widgets/doc/snippets/qstyleoption/main.cpp b/src/widgets/doc/snippets/qstyleoption/main.cpp index aa4220d8ea..05d5ece33d 100644 --- a/src/widgets/doc/snippets/qstyleoption/main.cpp +++ b/src/widgets/doc/snippets/qstyleoption/main.cpp @@ -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, |