Results 1 to 3 of 3

Thread: 2 Quick Questions

  1. #1
    Join Date
    Jan 2010
    Posts
    19
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default 2 Quick Questions

    Hi,

    Okay, first question:

    When reading from a text file, is it possible to specifiy certain values that I want to be read without having to read all of the other values in front of it? For example, I have a text file whose values are arranged like a table (ie the first line displays column headers, the next lines contain data listed under their respictive column headers), and I only want to read a few scattered values from this table, NOT all of them. How can I do this?

    Next question:

    I've downloaded the 'QProperty Browser Framework' from Qt solutions, and I'm trying to create a property browser in a QDockWidget, but I can't seem to get it to fit properly inside of the dock widget. When I use the QDockWidget::setWidget() function on other widgets, the child widgets are resized accordingly,but it's not working with the property broswer. What can I do to fix this?

  2. #2
    Join Date
    Apr 2009
    Location
    Valencia (Spain)
    Posts
    245
    Thanks
    38
    Thanked 19 Times in 19 Posts
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default Re: 2 Quick Questions

    About the first question I don't think so. If it's a XML file you can use QDomDocument, but if you need to read from a text document you have to load it all.

  3. #3
    Join Date
    Feb 2010
    Location
    Washington, DC
    Posts
    4
    Qt products
    Qt4 Qt Jambi
    Platforms
    Unix/X11 Windows

    Default Re: 2 Quick Questions

    I think as long as the file is a plain text file and you open and read it with any standard I/O (especially buffered), you're going to wind up reading the whole table into the disk anyway, at least to the last value you're trying to retrieve. Perhaps converting it to a different format might make accessing specific values easier.

Similar Threads

  1. Re: Quick help on QProcess
    By ufo-vl in forum Newbie
    Replies: 8
    Last Post: 27th July 2007, 07:19
  2. Quick help on QProcess
    By devilj in forum Newbie
    Replies: 4
    Last Post: 17th July 2007, 22:16
  3. Quick Test Pro and Qt
    By tstankey in forum Newbie
    Replies: 1
    Last Post: 19th April 2007, 20:27
  4. Quick spacing question
    By bruccutler in forum Newbie
    Replies: 4
    Last Post: 8th March 2007, 20:46
  5. Quick Help Needed with little App.
    By Sicko in forum Qt Programming
    Replies: 4
    Last Post: 19th December 2006, 10:17

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.