PDA

View Full Version : Reading commands from file



QtFan19
1st January 2010, 20:53
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

squidge
1st January 2010, 22:29
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.

wysota
1st January 2010, 23:15
What exactly would you like to use QtScript for?