Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qml: Access to a qml slot from a plugin

Qml: Access to a qml slot from a plugin

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 175 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    VinayBalajiRajputh
    wrote on last edited by VinayBalajiRajputh
    #1

    Hello everyone,
    Currently I have project (an qml application) and a plugin. The application has a view and user clicks on the view and on Pressed slot is called.

    Scene.qml 
    Item{
    id: scene
    MouseArea {
    onPressed:console.info("clicked");
    }
    }
    main.cpp
    ...
    rootContext->setContextProperty("QmlEngine", &engine); // Top layer engine
    engine.load("Application.qml");
    
    plugin.qml
    Item{
    onPressed:console.info("From application??")
    }
    

    Now I have a plugin (it is a C++ and Qml application and uses a interface provided by the project to load) and this plugin must receive the onPressed event. Can i use the "QmlEngine" to find the component in my plugin qml or is there any other way ? The goal is to create geometry shapes from the plugin on the application scene. I have simplified the above code to keep it minimal.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved