How to get larger radio buttons on XP?
Hello,
I'm developing an application that uses a touchscreen. I'm finding that radio buttons are difficult to press using the touchscreen because they are small. What is the best way to make the radio buttons larger? I thought of creating my own derivative of QWindowsXPStyle and implement the control drawing there. Or, implementing my own QRadioButton derivative that would implement the sizehint and paint methods. It seems to me that hte QStyle approach would work better because it will cause all radio buttons to be drawn larger without having to change that class type on every instance of a radio button.
Are there other approaches that are better?
Thanks!
Re: How to get larger radio buttons on XP?
Have you tried QApplication::setGlobalStrut()?
Re: How to get larger radio buttons on XP?
Yes. I'm using the global strut, which causes push buttons to be drawn larger. However, it has no effect on the radio buttons.
Re: How to get larger radio buttons on XP?
Do me a favor - try setting the style of one of your radiobuttons to just plain "windows" and see if it works.
Re: How to get larger radio buttons on XP?
OK.
I tried this with the QMotifStyle and the QWindowsStyle. Both drew the normal sized radio button.
Re: How to get larger radio buttons on XP?
It's as I feared then. You will have to subclass QStyle to draw the radiobuttons larger.
You can also try replacing the radiobutton pixmap in the pixmap cache. See QPixmapCache to see how to do this (this may only work for Qt3).
Re: How to get larger radio buttons on XP?
BTW Chicken Blood,
Your picture sort of freaks me out.:eek:
Re: How to get larger radio buttons on XP?
Quote:
Originally Posted by Ben.Hines
BTW Chicken Blood,
Your picture sort of freaks me out.:eek:
It freaks me out too.
Re: How to get larger radio buttons on XP?
Quote:
Originally Posted by Ben.Hines
Your picture sort of freaks me out.:eek:
LOL. Me too. Reminds me of the kid in the original Omen movie (even if his hair was dark).
Re: How to get larger radio buttons on XP?
For a touchscreen application, I would do my own QStyle, just to give me better size control over all the widgets. You have to do this anyway for the radiobuttons, because in Windows (and most other styles) they are drawn from a predefined bitmap.