From a5eae8651b0a328c1db3a6c2380eda5dc8773398 Mon Sep 17 00:00:00 2001 From: Mike Skec Date: Tue, 5 Jan 2021 20:12:44 +1100 Subject: Apply favourites button workaround https://bugreports.qt.io/browse/QTBUG-2036 --- src/widgets/favouritebutton.hpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/widgets/favouritebutton.hpp (limited to 'src/widgets/favouritebutton.hpp') diff --git a/src/widgets/favouritebutton.hpp b/src/widgets/favouritebutton.hpp new file mode 100644 index 0000000..a29763c --- /dev/null +++ b/src/widgets/favouritebutton.hpp @@ -0,0 +1,25 @@ +#ifndef FAVOURITE_BUTTON_HPP +#define FAVOURITE_BUTTON_HPP + +//! This class is used to implement a workaround +//! to get rid of the "little arrow" that Qt +//! forces onto toolbuttons that have menus. +//! +//! https://bugreports.qt.io/browse/QTBUG-2036 + +#include +#include + +class FavouriteButton : public QToolButton +{ + Q_OBJECT; +public: + explicit FavouriteButton(QWidget * parent = 0); + +protected: + virtual void paintEvent(QPaintEvent * event); + +}; + + +#endif -- cgit v1.2.3