Results 1 to 9 of 9

Thread: QString to int

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Nov 2010
    Posts
    4
    Platforms
    Unix/X11 Windows
    Thanks
    1

    Default Re: QString to int

    Quote Originally Posted by Zlatomir View Post
    You just need to validate, or do you need the numbers for further calculations?
    If you want just validation you can use QRegExp

    And if you want integers you can use the split member function, witch returns a QStringList, and then iterate the list and use toInt
    I'll need the numbers for further calculation, the validation will be made under those calculations.

    Thank you very much i'll try it.

    Edit: I tried to do what you said but i couldn't can you please help me! I need each number to an calculation! Thanks again!
    Last edited by itallor; 1st December 2010 at 23:34.

Similar Threads

  1. Replies: 8
    Last Post: 25th November 2010, 12:40
  2. With QString create a QString&
    By avis_phoenix in forum Newbie
    Replies: 1
    Last Post: 21st April 2010, 23:05
  3. Replies: 4
    Last Post: 1st February 2010, 15:21
  4. Replies: 4
    Last Post: 31st January 2008, 21:44
  5. how to copy part of QString to anothe QString
    By nass in forum Qt Programming
    Replies: 1
    Last Post: 26th March 2007, 20:05

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
  •  
Qt is a trademark of The Qt Company.