Results 1 to 3 of 3

Thread: Reading commands from file

  1. #1
    Join Date
    Dec 2009
    Posts
    5
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Reading commands from file

    Hi all,

    I´m developing a little application for generating finite element meshes (FEM). I would like to use a file for the input of commands. For example:

    Point, 1, 0.0, 0.0, 0.0

    should generate a point with number 1 and coordinates x=0.0, y=0.0 and z=0.0.

    Translate, Group, 1, 10.0, 0.0, 0.0

    should translate all geometries collected in group 1 for 10.0 in x-direction.

    Does it make sense to use QScript for this purpose? Or is there a better (easier) way?

    If QScript is a good choice: where do i find an example or a tutorial for this?

    Greetings,

    Michael

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Reading commands from file

    If the rest of the code is that simple, then I'd parse the file myself using QFile, but then again, I have no experience of QScript. Maybe I should read up on it.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Reading commands from file

    What exactly would you like to use QtScript for?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Reading and rereading a file with QXmlStreamReader
    By TheRonin in forum Qt Programming
    Replies: 14
    Last Post: 30th April 2015, 14:04
  2. help in reading XML file
    By cshiva_in in forum Qt Programming
    Replies: 1
    Last Post: 24th March 2008, 13:55
  3. QTextStream loses position while reading file
    By bjh in forum Qt Programming
    Replies: 2
    Last Post: 13th February 2008, 15:47
  4. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21
  5. how to corss compile for windows in Linux
    By safknw in forum Qt Programming
    Replies: 24
    Last Post: 13th May 2006, 05:23

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.