hi,
I need a Qslider with double headed......can any one please guide me how to do that.....
Thanks in advance
hi,
I need a Qslider with double headed......can any one please guide me how to do that.....
Thanks in advance
Reimplement the code from qt-x11-opensource-src-4.1.1/src/gui/widgets/qslider.* or I think more likely src/gui/styles/qstyle.*Originally Posted by moizahamedv
What do you mean by "QSlider with double heads"?
Did you try this?Qt Code:
To copy to clipboard, switch view to plain text mode
I think he means a slider with an interval - like with min and max heads.
When you say reimplement those files, most of the functionality of the qslider is actually contained in qabstractslider, but when I am trying to understand these files, there are two macros which are kind of confusing meReimplement the code from qt-x11-opensource-src-4.1.1/src/gui/widgets/qslider.* or I think more likely src/gui/styles/qstyle.*
Q_Q(QAbstractSlider) seems to give access to some member q, and likewise Q_D(QAbstractSlider) makes some member d available
what do these macros mean? are they important for what I am doing? because I am struggling to understand how the heads on the slider are actually implemented and I think that they may hold some of the information
thanks
georgie
Originally Posted by georgieQ_D macro declares a variable that points to the private part of the implementation, while Q_Q works the other way around --- gives you access to public part of the implementation.Qt Code:
#define Q_D(Class) Class##Private * const d = d_func() #define Q_Q(Class) Class * const q = q_func()To copy to clipboard, switch view to plain text mode
If you want to know why the implementation is split into public and private part, ask google about "pimpl".
Last edited by jacek; 9th May 2006 at 14:30.
Bookmarks