diff options
| author | Mike Skec <skec@protonmail.ch> | 2021-01-05 20:12:44 +1100 |
|---|---|---|
| committer | Felix Queißner <felix@ib-queissner.de> | 2021-01-05 11:14:34 +0100 |
| commit | a5eae8651b0a328c1db3a6c2380eda5dc8773398 (patch) | |
| tree | d78c668cc3c7e4850065cd7a07fd5a138a4ee58d /src/widgets/favouritebutton.hpp | |
| parent | 552327296c64003d4f5b5fedcb123e2ceea7aee5 (diff) | |
| download | kristall-a5eae8651b0a328c1db3a6c2380eda5dc8773398.tar.gz | |
Apply favourites button workaround
https://bugreports.qt.io/browse/QTBUG-2036
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 |
