Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QML textinput display the int use the index format .like "2e+06"

QML textinput display the int use the index format .like "2e+06"

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 448 Views
  • 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.
  • J Offline
    J Offline
    jimfar
    wrote on last edited by
    #1

    i use the textinput to input some number .including float and int .and i use RegExpValidator to limit the input. but the result of the format is index .how to display in normal format . like 2000000

    J.HilkJ 1 Reply Last reply
    0
    • J jimfar

      i use the textinput to input some number .including float and int .and i use RegExpValidator to limit the input. but the result of the format is index .how to display in normal format . like 2000000

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      hi @jimfar

      do a proper string transformation before assigning a new string to the TextInput

      TextInput{
              text: (2000000).toString(10)
          }
      

      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      3
      • J Offline
        J Offline
        jimfar
        wrote on last edited by
        #3

        3Q my this API is work.

        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