Results 1 to 3 of 3

Thread: Retaining a spinbox value

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2009
    Posts
    14
    Thanks
    4

    Default Retaining a spinbox value

    Hello, I have a minor problem which confounds me:

    I have a UI which contains a spinbox and a button. The user can choose whatever value can be used in the spinbox's range, but I want it to hold the currently selected value of the spinbox when the button is clicked and transfer it to another function. I have this so far:

    Qt Code:
    1. mainwidget->connect( strt_rcrding_btn, SIGNAL(clicked()), loc_spinbox, SLOT(value() ) ); //hold value of spinbox
    2.  
    3. mainwidget->connect (loc_spinbox,SIGNAL(valueChanged(int) ), &response, SLOT( write_dat_attrib(int) ) ); //and puts it to file
    To copy to clipboard, switch view to plain text mode 

    But QSpinBox::value() is not a valid slot so is there another slot I could use which emits the valueChanged signal? Or is there another way I could code this?

    Thanks
    Last edited by positive_4_life; 19th November 2009 at 16:31.

Similar Threads

  1. Replies: 2
    Last Post: 17th November 2009, 16:14
  2. unable to hide combobox or spinbox in toolbar
    By Sandip in forum Qt Programming
    Replies: 1
    Last Post: 22nd July 2008, 11:52
  3. Font size of a spinbox
    By SailinShoes in forum Qt Programming
    Replies: 6
    Last Post: 5th May 2008, 14:29
  4. buttonGroup and spinBox
    By mickey in forum Newbie
    Replies: 9
    Last Post: 21st May 2006, 17:50
  5. a simple question: spinbox
    By mickey in forum Newbie
    Replies: 3
    Last Post: 27th February 2006, 15:37

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.