Results 1 to 2 of 2

Thread: line edit value change with slider

  1. #1
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    6
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default line edit value change with slider

    hello
    i am using qt designer with windows.i have one task,the value(number) of line edit in the main window is changed with the slider prograss,[COLOR="Red"]can we do this task using QT4 r not?[COLOR="Red"]plz provide some help regarding this issue,if have any sample examples provide to me.
    thanks in advance

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: line edit value change with slider

    QSpinBox is basically a line edit, and especially designed for entering numbers.
    • add a QSpinBox and QSlider on the form
    • connect QSpinBox::valueChanged(int) to QSlider::setValue(int)
    • connect QSlider::valueChanged(int) to QSpinBox::setValue(int)
    • done
    Attached Files Attached Files
    J-P Nurmi

Similar Threads

  1. Qwizard crashed when created in a slot
    By joshlareau in forum Qt Programming
    Replies: 9
    Last Post: 15th January 2008, 09:16
  2. Slot to color background of line edit on textedited
    By tpf80 in forum Qt Programming
    Replies: 5
    Last Post: 21st June 2007, 09:02
  3. Replies: 8
    Last Post: 15th May 2007, 09:21
  4. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 06:13
  5. QTableView paints too much
    By Jimmy2775 in forum Qt Programming
    Replies: 2
    Last Post: 26th July 2006, 18:42

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.