[Interest] QActionGroup vs QButtonGroup
André Somers
andre at familiesomers.nl
Tue Mar 12 16:28:23 CET 2013
Op 12-3-2013 15:58, Sensei schreef:
> On 3/11/13 3:37 PM, Bill Crocker wrote:
>> On 03/11/2013 10:06 AM, Sensei wrote:
>>> On 3/11/13 12:47 PM, Bill Crocker wrote:
>>>> Wow. A non QML posting. How refreshing.
>>>>
>>>> Did you remember to add "/images/console.png" etc. to
>>>> your resources file?
>> Ah yes.
>>
>> I use a QActionGroup when I need this behavior.
>> - Create QActionGroup.
>> - Set all actions checkable
>> - Add actions to group.
>> - Add actions to toolbar as before.
>
> Ok, but adding buttons should work anyway, and it works in a different
> widget (outside a qmainwindow).
>
> Why?
I think because in this special case, Qt may be be pulling some tricks
to make your application look more native on OS-X. The style may be
using native rendering of the toolbar when you are using a toolbar at
the top of your main window, and fall back to rendering by itself when
put somewhere else. There could be some limitations on what you can do
in that native bar.
That _might_ explain the difference you see.
André
--
You like Qt?
I am looking for collegues to join me at i-Optics!
More information about the Interest
mailing list