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

extract substring from qstring

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 759 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.
  • S Offline
    S Offline
    s002wjh
    wrote on last edited by
    #1

    any function allow me to extract partial qstring thats separated by space or comma etc? for example

    qstring a="123,567,890"
    int a=123
    int b=567;
    int c=890;

    aha_1980A 1 Reply Last reply
    0
    • S s002wjh

      any function allow me to extract partial qstring thats separated by space or comma etc? for example

      qstring a="123,567,890"
      int a=123
      int b=567;
      int c=890;

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by aha_1980
      #2

      @s002wjh QString::split() comes to mind...

      afterwards iterate over the QStringList and use QString::toInt().

      HTH

      Qt has to stay free or it will die.

      1 Reply Last reply
      4

      • Login

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