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
Forum Updated to NodeBB v4.3 + New Features

how to get int value from QString data

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 617 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.
  • T Offline
    T Offline
    taek seo
    wrote on 20 May 2016, 02:38 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
    • P Online
      P Online
      Paul Colby
      wrote on 20 May 2016, 02:44 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
      • T Offline
        T Offline
        taek seo
        wrote on 20 May 2016, 05:16 last edited by
        #3

        thank you so much!!

        1 Reply Last reply
        0

        1/3

        20 May 2016, 02:38

        • Login

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