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. POD as PROP gives multiple definition error
Forum Updated to NodeBB v4.3 + New Features

POD as PROP gives multiple definition error

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 162 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.
  • M Offline
    M Offline
    majorRonk
    wrote on last edited by majorRonk
    #1

    In documentation it says POD can be used as a PROP.
    "use the POD keyword to define objects like this, which can then be used by in PROP/SIGNAL/SLOT definitions in your class definitions."
    https://doc.qt.io/qt-6/qtremoteobjects-repc.html

    But when i try this i get a multiple definition error:

    moc_rep_CustomInterface_source.cpp:105: error: multiple definition of `VariantList::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)'; ... moc_rep_CustomInterface_replica.cpp:105: first defined here

    probably its because i use
    qt_add_repc_replicas()
    qt_add_repc_sources()
    in the same project.

    #include <QList>
    #include <QVariantMap>
    
    POD VariantList(QList<QVariantMap> variantMaps)
    class CustomInterface
    {
        PROP(VariantList variantList SOURCEONLYSETTER)
    }
    
    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