I have a QToolBar widget added to a QMainWindow, and it appears docked on the top of the window.
My toolbar consists of two rows in a grid layout that contain QToolButtons. I wish to first move my QToolBar up a bit so that only the second row of buttons is visible and then have the toolbar move down to reveal the entire toolbar upon mouse hovering over the top.
I attempted to use the
move(int x, int y)
move(int x, int y)
To copy to clipboard, switch view to plain text mode
function provided by QWidget as follows:
toolbar->move(toolbar->pos().x(),toolbar->pos().y()-5);
toolbar->move(toolbar->pos().x(),toolbar->pos().y()-5);
To copy to clipboard, switch view to plain text mode
but unfortunately it doesn't move. My toolbar is set to floatable as well( which i believe it is by default).
I have also attempted to do the following in the hopes of getting it to work with the toolbar undocked, however undocking the widget just places it in a separate window whereas I need it to be integrated into my QMainWindow:
toolbar->setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
toolbar->setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
To copy to clipboard, switch view to plain text mode
Any help would be greatly appreciated.
Bookmarks