I've created a form using the Qt designer which includes a QToolButton.
I can turn it using ui->favouriteToolButton
.
I used the designer because it's much more simple then code all the gui.
Problem is that specifically for this ToolButton
i want to code by creating its own class:
class FavouriteMenu : public QToolButton
{
Q_OBJECT
public:
explicit FavouriteMenu(QWidget *parent = 0);
//~FavouriteMenu();
private:
QMenu *menu; //MENU
QAction *addToBookmarkAct;
QAction *editBookmarkAct;
...
I want to be able to override ui->favouriteToolButton
with a new instance of FavouriteMenu.
How can i do it?