[Qt-interest] Increase QRadioButton indicator size?
Malyushytsky, Alex
alex at wai.com
Sat Jun 26 01:49:20 CEST 2010
At one point I tried to do similar thing.
It looks like something is limiting maximum size of indicators.
If you try for example to make it smaller it will work.
(For example make it 3 pixels ).
Brief look at source code did not help and I gave up cause I needed result fast and I just implemented custom drawing.
But I afraid you are not missing anything, this is either feature or bug, do you will not get quick fix for it.
Regards,
Alex
-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Jason Tiller
Sent: Thursday, June 24, 2010 7:30 PM
To: qt-interest at trolltech.com
Subject: [Qt-interest] Increase QRadioButton indicator size?
Hi, All, :)
I apologize if this question has been asked and answered before (I did
a cursory search of the archives and only found one, unresolved
discussion from 2003) - this is my first post to qt-interest!
How can I increase the size of the indicator on a QRadioButton? I
haven't had any luck with the simple mechanisms I tried. Setting the
widget's stylesheet like so in PyQt4
style = \
'''QRadioButton::indicator {
width: 100px;
height: 100px;
}" )
'''
caused the space *alotted* to the indicator (radio button) to be
expanded, but the size of the indicator didn't change. The little
radiobutton was stuck in the top-left-hand corner of that huge space -
very lonely looking.
I fiddled with various positions, but while I could move the button
image around, I could never change its size.
Then I tried loading a .png file as the image. Essentially, I added
this line:
image: url(/home/jasont/experiments/style_radio_buttons/button.png);
Interestingly, the image was placed square in the center of the
100-pixel rectangle... but it also didn't expand in size.
The documentation seems to indicate that the only way I could get the
indicator to expand to fill the full space was to use SVG files.
I've implemented a crude radio button button manual painting, but
that's *far* from ideal.
Anybody have a suggestion as to how to perform this seemingly
obvious/trivial task? I'm sure I'm missing *something*!
Thanks,
---Jason
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.
“This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you.”
“Please consider our environment before printing this email.”
More information about the Qt-interest-old
mailing list