diff options
Diffstat (limited to 'src/widgets/favouritebutton.hpp')
| -rw-r--r-- | src/widgets/favouritebutton.hpp | 25 |
1 files changed, 25 insertions, 0 deletions
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 <QToolButton> +#include <QtGui> + +class FavouriteButton : public QToolButton +{ + Q_OBJECT; +public: + explicit FavouriteButton(QWidget * parent = 0); + +protected: + virtual void paintEvent(QPaintEvent * event); + +}; + + +#endif |
