Hi,
I am a newbie in Qt. I am trying to use QSlider to control the color of a 3D volume. But I having a hard time figuring it out. This is what I am doing or trying to do:
This is only a part of my code-
int mvar1;
slider->setMinimum(1);
slider->setMaximum(100);
if(slider has moved )
{
myvar1 = get new value of slider; // this value then goes into another function to control the color
}
int mvar1;
QSlider *slider = new QSlider(Qt::Horizontal);
slider->setMinimum(1);
slider->setMaximum(100);
if(slider has moved )
{
myvar1 = get new value of slider; // this value then goes into another function to control the color
}
To copy to clipboard, switch view to plain text mode
Can anyone guide me how to do this without using signals and slots? How do I figure out if the slider has moved? Is there a function that gives me the status of the slider? I went through the documentation but had a hard time understanding it. What is the easiest way of doing this?
Thanks,
Ashish
Bookmarks