Results 1 to 10 of 10

Thread: Connection a QVector<QSlider *> adequately

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2007
    Location
    Rome, GA
    Posts
    199
    Thanks
    14
    Thanked 41 Times in 35 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Connection a QVector<QSlider *> adequately

    EDIT: The above subclassing method also works. I've done that before too, in certain scenarios. For your problem I would say using a signal mapper is still the cleaner method, unless you have other reasons to create a subclass.

    Yes, with the method I showed you need to manually grab the value from the list of QSliders, but it is very straightforward because you have the index. So you could do this inside your setDeformationFactor(int):

    Qt Code:
    1. setDeformationFactor(int index)
    2. {
    3. int new_slider_value = m_sliders[index]->value();
    4. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by JimDaniel; 16th March 2009 at 20:25.

Similar Threads

  1. SQL connection closure problem.
    By cbarmpar in forum Qt Programming
    Replies: 1
    Last Post: 8th September 2008, 08:42
  2. Client/Server Error: BadIDChoice
    By 3nc31 in forum Qt Programming
    Replies: 5
    Last Post: 27th November 2007, 10:22
  3. Replies: 3
    Last Post: 2nd August 2007, 21:28
  4. How do I keep the client connection open ?
    By probine in forum Newbie
    Replies: 2
    Last Post: 25th March 2006, 19:06
  5. Can I launch a dial-up connection in Windows?
    By gtthang in forum Qt Programming
    Replies: 3
    Last Post: 9th February 2006, 12:32

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.