[Interest] QActionGroup vs QButtonGroup

Bill Crocker william.crocker at analog.com
Mon Mar 11 15:37:13 CET 2013


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.

>
> Of course, they are using the very same icons, as you can see from the
> code. One works, the other doesn't.
>
>> Also, QIcon is light weight, so you should use
>> QIcon and not Pointer-To-QIcon for things like
>> your consoleIcon_.
>
> Ok, that makes sense!
>
> But do you experience the same issue?
>
>
> Cheers!
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>




More information about the Interest mailing list