Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7539389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:22:08+00:00 2026-05-30T07:22:08+00:00

I make a relation between QSpinbox and QSlider. QSpinbox has a range -10.0 to

  • 0

I make a relation between QSpinbox and QSlider.
QSpinbox has a range -10.0 to 10.0, and QSlider has a range -100 to 100.
So, the value of QSlider divided by 10 is connect to QSpinbox, and vice versa.
I use “valueChanged()” SIGNAL to each other.
And I want to type “3.5” in QSpinbox, in this case when I type just “3”, QSpinbox’s “valueChanged” change QSlider’s value, and QSlider do again. So, QSpinbox lose it’s focus.
I can’t type “3.5” in one shot.
“valueChanged()” SIGNAL works too diligently 🙂
How can I solve this issue?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T07:22:09+00:00Added an answer on May 30, 2026 at 7:22 am

    The valueChanged() signal is indeed meant to fire actively as it is being changed. If you want a signal fired when editing has finished, there is a signal specifically for that called editingFinished: http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qabstractspinbox.html#editingFinished

    You may have overlooked it because its a member of the superclass QAbstractSpinBox. Note that this signal will fire once the widget loses focus or the user hits enter. If that is not the behavior you want either, then the only remaining option is to use a QTimer with a short delay that restarts everytime valueChanged fires, and once the user waits long enough the timeout will actually then update your slider.

    I also noticed that you are trying to use non-integer values with a QSpinBox, which is designed for ints. You might want to try a QDoubleSpinBox that is designed for floating precision. The valueChange() might behave slightly better as its expecting the decimal. Though I am just making a guess as I haven’t tested it: http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qdoublespinbox.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

actually, I can make a relation between a table field and a variable by
How can you make the efficient many-to-many -relation from fileID to Words and from
To make things easier when switching between machines (my workstation at the office and
I have a straightforward relation between two models: Asset and Update. both models (minus
... always getting exceptions when creating a edge/relation between a vertex and the Neo4j
I have a many to many relation between a table product and a table
i have a generated table called employee , as a relation between two tables:
What are "sequence points"? What is the relation between undefined behaviour and sequence points?
Make a new AS3 Document in Flash, paste in the following code and run
make is not only useful for building your programming project, but it seems to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.