PDA

View Full Version : Is it possible to call a c++ class method by string name?



blv
10th April 2010, 19:46
Is this (http://old.nabble.com/call-c%2B%2B-method-by-string-name-%2B-passing-parameters-td27196409.html) possible If I use qobject? Is it possible to call a qobject class method by string name?

squidge
10th April 2010, 21:42
Sure, you could abuse Qt's slot system.

blv
10th April 2010, 22:26
But I want to call function/method that are part of qt gui... Is it possible ?

squidge
10th April 2010, 23:10
Yes, how complex and how much work is required from you depends on which methods and what you want to do with those methods.

What do you want to accomplish? Maybe there is an easier way ?

blv
15th April 2010, 19:25
I want to create something like this: www.gtk-server.org...

squidge
15th April 2010, 20:13
In which case, QtScript would probably be better suited.

wysota
15th April 2010, 21:02
To me it is kind of reinventing the wheel if we remember there is PyQt, QtScript and Kross (http://en.wikipedia.org/wiki/Kross_(KDE)).