Results 1 to 2 of 2

Thread: Read Data in formated manner

  1. #1
    Join Date
    Jun 2007
    Location
    India/Bangalore
    Posts
    156
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Thumbs up Read Data in formated manner

    Hi All,

    I am using Qt 4.3 , I want to read some data from QFile in some formatted manner ,

    For example

    I have Some string like following in my file,

    V123.2.34.1234

    I want to read the integers placed between my String.

    that may be any number of digit , My output will like following

    a=123 , b= 2 ,c=34 and d=1234 (assume a b c d are integers)

    My format specifier for this o/p is :"V%d.%d.%d.%d"


    I tried QTextStream but i didn't find any methods to get data in Formated manner?

    If anybody knows please help me ?
    Thanks,
    Rajesh.S

  2. #2
    Join Date
    Oct 2007
    Location
    Grenoble, France
    Posts
    80
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Read Data in formated manner

    Use QString.
    split() remove() and toInt() methods.
    You have to run a level 3 diagnostic.

    Ashes to ashes, Qt to Qt ( wysota )

Similar Threads

  1. speed of setdata - lots of items in treeview
    By Big Duck in forum Qt Programming
    Replies: 4
    Last Post: 6th July 2006, 12:53
  2. Replies: 3
    Last Post: 23rd June 2006, 17:46

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.