Hello guys, I'm using script language ChaiScript with c++ and Qt. I've defined such function:
void ChaiPainter::drawRectangle(QPainter *painter, int x, int y, int height, int width)
{
painter.drawRect(x, y, width, height);
}
And in application paint-event:
void MainWindow::paintEvent(QPaintEvent *event)
{
QPainter painter(thi...
Does anyone know if it is possible to have a C++ class with overloaded operators such as +,-,* and declare it somehow (this is where the magic happens) to a QtScriptEngine such that js-expressions like "a+b" are evaluated as they would be on the C++ side?
...
Hi,
I use this code to validate some properties of a set of Qt objects in ChaiScript:
/// initialize the engine
boost::shared_ptr<chaiscript::ChaiScript> chai;
chai.reset(new chaiscript::ChaiScript());
std::cout << "ChaiScript engine created!!!" << std::endl;
///
/// register elements
//
assert(ui->che...