2

When starting a new Qt Quick Extension Plugin, it asks me to specify Object Class Name (Easy enough), but also something called URI.

  1. What does URI stand for?
  2. What does this project need URI for?
  3. Does my project depend on URI, or is optional?
  4. What do its components, "com" . "mycompany" . "qmlcomponents" reference?
  5. How do I configure its components to match my setup?

URI

1

A Qt Quick2 Extension Plugin is a C++ plugin that makes it possible to offer extensions that can be loaded dynamically into applications using the QQmlEngine class.

To make it possible to query at run-time whether a plugin implements a given interface, you must use the Q_DECLARE_INTERFACE() macro. The first argument is the name of the interface. The second argument is a string identifying the interface in a unique way, the URI.

By convention, Qt use a Java package name syntax to identify interfaces, hence the "com.mycompany.qmlcomponents" schema.

Source: http://qt-project.org/doc/qt-5/qtwidgets-tools-plugandpaint-example.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.