Qt-interest Archive, April 2007
QToolbar menu settings
Message 1 in thread
Hi,
I was wondering about QToolbar right click menu. Usually on this menu, you
have a list of entry menu, one per toolbar, with a check box to hide / show
the corresponding toolbar. After that, a separator and a customize menu
where you can customize the toolbar ( for exemple, it displays a dialog
where you can say : toolbar icon only or icon + text below, or icon + text
deside, or big icon / small icon, etc). You can even imagine to change the
toolbar look, icon sets, position, etc.
On qt, I only get the listing of available toolbar. Is there a way to change
this menu and perhaps add some entry to allow this kind of behaviour.
---
Second question also toolbar related.
The QToolButton can have two behavior :
- InstantPopup : it displays a menu when clicking. When selecting an entry,
it calls the corresponding qaction and change the Qtoolbutton to the
corresponding new setting.
The button itself doesn't have a beside triangle to show that a menu will be
displayed.
- MenuButtonPopup : it's a button where the corresponding qaction is called
only when you click on it. You change the qaction by clicking on the
triangle but it will just change the state of the button, not call the
action.
My wish is to have the behaviour of InstantPopup, but with a triangle
displayed. We need to inform the user that when clicking on it, a menu will
show.
We find some solution by adding directly a triangle in bottom right corner
of the icon, but it's not really thr right way.
Did someone have done a good trick for that ?
Alexandre
Message 2 in thread
alexandre jenny a écrit :
> Hi,
>
> I was wondering about QToolbar right click menu. Usually on this menu,
> you have a list of entry menu, one per toolbar, with a check box to
> hide / show the corresponding toolbar. After that, a separator and a
> customize menu where you can customize the toolbar ( for exemple, it
> displays a dialog where you can say : toolbar icon only or icon + text
> below, or icon + text deside, or big icon / small icon, etc). You can
> even imagine to change the toolbar look, icon sets, position, etc.
>
> On qt, I only get the listing of available toolbar. Is there a way to
> change this menu and perhaps add some entry to allow this kind of
> behaviour.
>
> ---
>
> Second question also toolbar related.
> The QToolButton can have two behavior :
> - InstantPopup : it displays a menu when clicking. When selecting an
> entry, it calls the corresponding qaction and change the Qtoolbutton
> to the corresponding new setting.
> The button itself doesn't have a beside triangle to show that a menu
> will be displayed.
> - MenuButtonPopup : it's a button where the corresponding qaction is
> called only when you click on it. You change the qaction by clicking
> on the triangle but it will just change the state of the button, not
> call the action.
>
> My wish is to have the behaviour of InstantPopup, but with a triangle
> displayed. We need to inform the user that when clicking on it, a menu
> will show.
> We find some solution by adding directly a triangle in bottom right
> corner of the icon, but it's not really thr right way.
> Did someone have done a good trick for that ?
>
> Alexandre
for toolbar customization dialog, if you have commercial licence you can
use qttoolbardialog
<http://www.trolltech.com/products/qt/addon/solutions/catalog/4/Widgets/qttoolbardialog/>solution.