c++ - QDial change position indicator text -
i use qdial control input time values in sec. how change automatically added text shows in middle of these dials?
edit: come qtcurve style.
if there no code in program explicitly display integral value (in signal/slot), may current qt style it. see following examples of qt styles see display of integer not part of qdial display:
http://qt-project.org/doc/qt-4.8/gallery-plastique.html
http://qt-project.org/doc/qt-4.8/gallery-cde.html
http://qt-project.org/doc/qt-4.8/gallery-gtk.html
http://qt-project.org/doc/qt-4.8/gallery-cleanlooks.html
http://qt-project.org/doc/qt-4.8/gallery-windowsvista.html
http://qt-project.org/doc/qt-4.8/gallery-macintosh.html
see: http://qt-project.org/doc/qt-4.8/qstyle.html more info on styles.
you can in program code following code:
qapplication::setstyle(...);
you check following:
- qt_style_override environment variable
- -style= argument passed program
if still don't find how style set, may default style platform.
what following says ?
qstyle *currentstyle = qapplication::style(); qdebug() << currentstyle; qdebug() << currentstyle->objectname(); qdebug() << currentstyle->metaobject()->classname();
edit: see identified style qtcurve.
source there: http://kde-look.org/content/download.php?content=40492&id=1&tan=23640920
and can see style responsible displaying value:
file: style/qtcurve.cpp, line: 7980
// draw value... #ifdef dial_dot_on_ring drawitemtextwithrole(painter, outer.adjusted(sliderwidth, sliderwidth, -sliderwidth, -sliderwidth), qt::aligncenter, palette, state&state_enabled, qstring::number(slider->slidervalue), qpalette::buttontext); #else int adjust=2*sliderwidth; drawitemtextwithrole(painter, outer.adjusted(adjust, adjust, -adjust, -adjust), qt::aligncenter, palette, state&state_enabled, qstring::number(slider->slidervalue), qpalette::buttontext); #endif
from on, can either:
- recompile style after disabling faulty code (commenting or using boolean option).
- ask maintainer provide option disable display of dial's value.
Comments
Post a Comment