Results 1 to 6 of 6

Thread: QSlider problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2006
    Location
    USA
    Posts
    23
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default QSlider problem

    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-

    Qt Code:
    1. int mvar1;
    2. QSlider *slider = new QSlider(Qt::Horizontal);
    3. slider->setMinimum(1);
    4. slider->setMaximum(100);
    5. if(slider has moved )
    6. {
    7. myvar1 = get new value of slider; // this value then goes into another function to control the color
    8. }
    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
    Last edited by wysota; 11th December 2006 at 23:07. Reason: missing [code] tags

Similar Threads

  1. QSlider Update Problem
    By December in forum Qt Programming
    Replies: 4
    Last Post: 10th September 2006, 04:02
  2. Grid Layout Problem
    By Seema Rao in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2006, 12:45
  3. Problem with bitBlt
    By yellowmat in forum Newbie
    Replies: 1
    Last Post: 5th April 2006, 14:08
  4. fftw problem
    By lordy in forum General Programming
    Replies: 1
    Last Post: 16th March 2006, 21:36
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.