Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (24 sloc) 863 Bytes

fooq

fooq lets you run Qt / C++ code as if it was a script. You can use, for example:

#!/usr/bin/fooq

qDebug() << "fooq!";

And it will create a temp directory, build and run the script already including and linking to QtCore. You can also run it directly on the command line:

$ fooq
qDebug() << "fooq!";
^D
"fooq!"
$

It automagically picks up on previously declared functions, classes, structs, includes and whatnot and won't munge them into your main method. So this works fine:

#!/usr/bin/fooq

static void foo()
{
  qDebug() << "fooq!";
}

foo();

I found myself creating a lot of one-off 5 line projects to test things, and this has saved me a good deal of time in testing C++ one-liners or doing quick processing tasts that Qt is well suited to.

Copyright

Copyright © 2010 Scott Wheeler. See LICENSE for details.