Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Use extended type in a QML signal with C++ slot

Use extended type in a QML signal with C++ slot

Scheduled Pinned Locked Moved QML and Qt Quick
signal & slotextended type
1 Posts 1 Posters 591 Views 1 Watching
  • 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.
  • M Offline
    M Offline
    marcosbontempo
    wrote on last edited by
    #1

    Hello,

    I created my own C++ type with the macro Q_DECLARE_METATYPE . Now I want to use it in a QML signal with C++ slot. The problem is that I can't use my type in QML, cause it is a invalid signal parameter type . I wanted to create the sinal like this in my QML file:

    signal buttonSend(MyType msg)

    How can I use C++ extended types as an QML signal argument? How can I import my C++ header to become my object a valid parameter?

    Any tip will be very helpful.
    Thanks.

    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