Results 1 to 2 of 2

Thread: split a Qstring into QStringList

  1. #1
    Join Date
    Dec 2016
    Posts
    3
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default split a Qstring into QStringList

    hi,
    I want to split a String which containts Characters and numbers i want to separate into a QStringList.
    Qstring Str={A0123B4567C7890D0987} This is my String i want
    QStringList num={0123,4567,7890,0987}
    QStringList Ch={A,B,C,D}
    Thanks

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,532
    Thanked 282 Times in 277 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: split a Qstring into QStringList

    Use QRegExp.

Similar Threads

  1. Replies: 7
    Last Post: 6th February 2017, 19:10
  2. how to split the text in Qstringlist
    By iswaryasenthilkumar in forum Newbie
    Replies: 8
    Last Post: 16th February 2015, 05:37
  3. Split QString only at unescaped slash
    By QphiuchuS in forum Newbie
    Replies: 6
    Last Post: 20th January 2015, 21:48
  4. Replies: 5
    Last Post: 26th January 2012, 14:04
  5. QString split()
    By ShaChris23 in forum Newbie
    Replies: 4
    Last Post: 3rd May 2007, 04:10

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.