[Qt-interest] Can I raise 2 toolbar icons at the same time?

Bob Babcock wssddc at nospam.gis.net
Sun May 30 00:47:21 CEST 2010


Bob Babcock <wssddc at nospam.gis.net> wrote in
news:Xns9D84D590A1F5Awssddcgisnet at 62.70.27.71: 

> Yes.  The only problem is getting the visual effect of both icons
> raising up at the same time to indicate that they control related
> functions.  Assuming I can get them both raised up, I might have to do
> something like putting a narrow separator between them to finish the
> effect. 
> 
> I assume I could do this by tracking mouse entry/exit and manually 
> raising/lowering the buttons.  Is there an easier way?

I got the visual effect I wanted, but I'm surprised at what I had to do.  I 
thought that I should call setAutoRaise(false), then use raise() and 
lower() on the toolbar buttons.  Instead, I find that raise() and lower() 
don't have any obvious effect, but setAutoRaise(false) raises the button 
and setAutoRaise(true) lowers the button.  I'm probably not triggering the 
same effect as you normally get when moving the mouse over a toolbar button 
because the border around my raised buttons is darker.



More information about the Qt-interest-old mailing list