Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Input Range restriction with validation in QspinBox
Forum Updated to NodeBB v4.3 + New Features

Input Range restriction with validation in QspinBox

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 522 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aparna_j
    wrote on last edited by
    #1

    Say the range is set to 10-50.
    As per requirement :-

    • user should not be able to enter ' 0 ' , nor 05/ 005 /000/500.
      values should be like 10/11/49/50.
      Is there any method other than valuechange() because valuechange will allow user to enter and after that it will verify.
      I need disabling tens digit as 0 .

    Thanks in Advance

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      If you want special restriction you can re-implement QSpinBox and reimplement the validate method to fit your needs.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved