Hi,
I've a QToolBar with 30 Actions : one column of 30 Icons.
I want organize this Actions in 2 Colums of 15 items for column.
I think to create a Vertical Layout, and insert in this Layout 15 Horizontal Layouts.
Then in every Horizontal Layouts add two QActions.
But the layout with the QActions in the QToolBar don't works :
I Post a little example, with only one icon (QAction) :
1. I Create a Widget (w1) with only a QAction.
2. I Create an HorizontalLayout (hl) and i set to it the Widget (w1)
3. I Create a new Widget (w2)
4. I Set to w2 the layout (hl) that contains the other widget (w1).
5. I Add the w2 widget to the toolBar.
Qt Code:
w1->addAction(myAction); // myAction is QAction*; hl->addWidget(w1); w2->setLayout(hl); toolBar->addWidget(w2);To copy to clipboard, switch view to plain text mode
This code don't works. In the Toolbar nothing appears.
How can I manage the layout in the ToolBar ?
Thank you
Salvo
Bookmarks