Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Qml textfield qstr to python as integer
Forum Updated to NodeBB v4.3 + New Features

Qml textfield qstr to python as integer

Scheduled Pinned Locked Moved Unsolved Qt for Python
2 Posts 2 Posters 463 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.
  • M Offline
    M Offline
    Marianagb
    wrote on last edited by
    #1

    How can I export a value for a textfield to python as an integer an not as a string?

    1 Reply Last reply
    0
    • Kent-DorfmanK Offline
      Kent-DorfmanK Offline
      Kent-Dorfman
      wrote on last edited by
      #2

      python can convert string values to integers if the string represents a valid integer...such as

      s="123"
      iVal=int(s)
      

      If the thing cannot be converted then it throws an exception.

      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