Hi,
I have a MainWindow Application contains five Tool Buttons on it.By pressing Up,Down,Left and Right i can move around the button.While Moving i want to highlight the buttons .Please guide me to do this one
Regards
Hi,
I have a MainWindow Application contains five Tool Buttons on it.By pressing Up,Down,Left and Right i can move around the button.While Moving i want to highlight the buttons .Please guide me to do this one
Regards
Kavin
How do you move ?
do you change focus ? or simulate button click ?
and what do you mean by highlighting ? what way you want ? background changed ? border in some color, or color overlay ?
HI,
Like changing the Focus i am moving.Highlighting means Change the BackGround colour of the tool button
Regards
Kavin
You can try setFocus(). But you should be aware that highlighting on focus doesn't always appear; some styles don't draw focused widgets with highlighting. You can experiment with this in the Designer and see what different styles do, although results will also vary from platform to platform.
If you need to be certain, you can either select a style that supports highlighting, or you can add specialized rendering through a customized paint() routine or (possibly) through stylesheets.
It would be nice if you subclass QPushButton / QToolButton and then draw highlight in the paintEvent function.
Bookmarks