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. how to get int value from QString data
QtWS25 Last Chance

how to get int value from QString data

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 609 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.
  • taek seoT Offline
    taek seoT Offline
    taek seo
    wrote on last edited by
    #1

    hi!

    i have QString data :
    test.cpp:131: error: ?testFunc01? was not declared in this scope
    test.cpp:17: error: variable or field ?_temp? declared void
    test.cpp:82: error: two or more data types in declaration of ?testFunc01?
    etc..

    and i want int value : 131, 17, 82 -is line number

    how to get line number value?

    1 Reply Last reply
    0
    • Paul ColbyP Offline
      Paul ColbyP Offline
      Paul Colby
      wrote on last edited by
      #2

      Hi @taek-seo,

      and i want int value : 131, 17, 82 -is line number

      Something like:

      int lineNumber = lineString.split(':').at(1).toInt();
      

      Of course you should do some error / bounds checking too.

      Cheers.

      1 Reply Last reply
      1
      • taek seoT Offline
        taek seoT Offline
        taek seo
        wrote on last edited by
        #3

        thank you so much!!

        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