svalaskevicius / qtjs-generator

Qt API bindings generator for Node.js
38 stars 9 forks source link

So many Qt classes can not be bind, why? #18

Closed ericmayc closed 10 years ago

ericmayc commented 10 years ago

Hi @svalaskevicius , I want to develop a project use qtjs and I will use a lot of qt quick. But I read the metagen config files in qtjs-generator/metagen and I find so many files, classes and macros are skipped and couldn't be binding there. Can you tell me why? Cpgf can not support these? Or metagen can not support these? Any problems here?

svalaskevicius commented 10 years ago

Hi,

Some of them are skipped as they're platform specific, some - as they're private qt classes..

Also, I've skipped some of the classes purely to postpone the support of them - some minor fixes needed to be done to bind them (metagen/config).

Are there any skipped classes that you need to use?

Regards Sarunas

svalaskevicius commented 10 years ago

If you're talking about the skipped classes in qml module - its actually binding more :)

Qtjs currently binds the private Api of qtquick and qml, but excludes the unlinkable classes.

ericmayc commented 10 years ago

Thanks for your answer! I just interest why the config file are so complex and so many special settings. Is it possible that develop the config file to support all development with Qt quick? I guess this config file is the part of whole project and will changed with different project. It can not support all project about qt quick without any changes. Am I right?

wqking commented 10 years ago

The config file is per project specified. You can't simply copy and use it in your own project/library. However, the meta data generated from the config and metagen can be used in your project. You don't need to generate the meta data again.

ericmayc commented 10 years ago

I am confused. I think the config is used to generate meta data. Different configs should generate different meta datas.

svalaskevicius commented 10 years ago

Yes. You could tune the config to add /remove the qt's bindings to tune for your project (e. G. Removing unused bindings will reduce qtjs's size..) thus you'd prepare a custom app launcher..

Generally you should be able to use qtjs with the config as is. As it's just binding qt Api to the js :)

E. G all examples are using the same qtjs to launch them. (qtjs example.js) On 19 Sep 2014 11:07, "ericmayc" notifications@github.com wrote:

I am confused. I think the config is used to generate meta data. Different configs should generate different meta datas.

— Reply to this email directly or view it on GitHub https://github.com/svalaskevicius/qtjs-generator/issues/18#issuecomment-56159246 .

ericmayc commented 10 years ago

Whatever, I can tune the config to support my requirements on development with qt quick, right?

svalaskevicius commented 10 years ago

Sure - if you add any new bindings would be good if you could also add a pr so others can benefit as well :)

Let me know if you have any problems :)