Important: Please read the Qt Code of Conduct -

What JS functions are available in Qt Creator Wizards? Where's the documentation?

  • If you're adding a new template / wizard to Qt Creator, you'll see that existing ones have several calls to JS: <something>. Sometimes those are pretty trivial statements to evaluate, but other times, they're things like: Util.preferredSuffix('text/x-c++src') or Cpp.classToFileName. are these any sort of standard JS libraries? or are their sources somewhere available? The 'wizard' documentation just shows that they're used but doesn't give any information as to how to use them.

  • I would love to know, too.

  • Lifetime Qt Champion


    I'd take a look at Qt Creator's sources to see what's in there. You can clone it from git here

  • Yes, that's an option but hopefully they will get the documentation written. Digging through the source is one way to get the info but it's not very productive but until the docs are done it may be the only way.

  • This StackOverflow question addresses this:

    There's no documentation, but if you grep for registerQObjectForJs you'll find them all. The answer to the SO question contains a current list of all the global objects and their methods.

Log in to reply