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. using qobject class as datatype of a qvector in another class

using qobject class as datatype of a qvector in another class

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 254 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.
  • D Offline
    D Offline
    Dijkstra
    wrote on last edited by
    #1

    so i am trying to create a qvector which stores objects of another class but i need that class to be a qobject class to use signals and slots but i came a cross the fact that qobject class doesnt have a copy constructor so i cant use it as a datatype for a qvector any idea on how to solve this problem

    QVector<plugin>Plugins;
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Use QVector<Plugin *> and store your objects on the heap.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      D 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        Use QVector<Plugin *> and store your objects on the heap.

        D Offline
        D Offline
        Dijkstra
        wrote on last edited by
        #3

        @SGaist thank you it worked

        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