Reinstall the two QToolbars back to the same QToolbarArea

I am working on a Qt project where I need to get the positions of a toolbar at runtime. I used QMainWindow::toolBarArea(QToolBar *toolbar)

to get the current docking area of ​​the toolbar. And then I can use that later with QMainWindow::addToolBar ( Qt::ToolBarArea area, QToolBar * toolbar )

.

Suppose I am setting two toolbars in the same area (i.e. the bottom area) as shown below.

-----------------------------------
| Toolbar 1                       |
-----------------------------------
| Toolbar 2                       |
-----------------------------------

      

Then I save the region I got from QMainWindow::toolBarArea

using QSettings

and then load it with QMainWindow::addToolBar

, it loads like below.

-----------------------------------
| Toolbar 1      | Toolbar 2      |
-----------------------------------

      

Is there a way to reset their original shape without using it QMainWindow::saveState()

?

+3
c ++ qt qtoolbar


source to share


No one has answered this question yet

Check out similar questions:

1518
Image processing: improvement of the algorithm for the recognition of "Coca-Cola Can"
3
Getting the area of ​​the dock where the MFC docking camera was installed
2
QToolBar - disable fields
1
Make QToolBar transparent
1
Show log text in QMainWindow using MdiArea
0
Getting wrong position from geometry QMainWindow ()
0
Qt QMetaType serialization of custom types and QVariant
0
QToolbar in QMainWindow - toolbar signaling its position change
0
A simple way to get the current dock area of ​​a QToolbar
-1
How to get an order qtoolbars



All Articles
Loading...
X
Show
Funny
Dev
Pics