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. Display 1 as 01, 2 as 02, 3 as 03, 4 as 04, 5 as 05, upto 9 as 09 in QLine Edit
Forum Updated to NodeBB v4.3 + New Features

Display 1 as 01, 2 as 02, 3 as 03, 4 as 04, 5 as 05, upto 9 as 09 in QLine Edit

Scheduled Pinned Locked Moved Mobile and Embedded
qlineedit
3 Posts 3 Posters 961 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.
  • S Offline
    S Offline
    Sidii
    wrote on last edited by
    #1

    Dear All,
    I am using QLineEdit to input number only. Please suggest me how to display single digit number as double digits like 1 as 01, 2 as 02. Is there any inbuilt mechanism to achieve the same? Some inbuilt function? Kindly suggest.

    Thanks
    Sid

    1 Reply Last reply
    0
    • Hamed.MasafiH Offline
      Hamed.MasafiH Offline
      Hamed.Masafi
      wrote on last edited by
      #2
      lineEdit1->setInputMask("\\00");
      

      Remote object sharing (OO RPC)
      http://forum.qt.io/topic/60680/remote-object-sharing-oo-rpc-solved

      Advanced, Powerful and easy to use ORM for Qt5
      https://forum.qt.io/topic/67417/advanced-powerful-and-easy-to-use-orm-for-qt5

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

        Hi,

        Since those are only numbers, why not use QSpinBox ?

        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
        0

        • Login

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