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. Allocating an object of abstract class type

Allocating an object of abstract class type

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
8 Posts 3 Posters 1.5k Views 2 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.
  • C Offline
    C Offline
    ceydasimsekk
    wrote on last edited by
    #1

    Ekran görüntüsü 2024-08-15 155946.png

    When I want to derive PlayerController from QAbstractListModel, I get the following error in main.cpp

    Ekran görüntüsü 2024-08-15 155957.png

    JonBJ 1 Reply Last reply
    0
    • C ceydasimsekk

      Ekran görüntüsü 2024-08-15 155946.png

      When I want to derive PlayerController from QAbstractListModel, I get the following error in main.cpp

      Ekran görüntüsü 2024-08-15 155957.png

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @ceydasimsekk
      Please post code not screenshots.

      So have you done what https://doc.qt.io/qt-6/qabstractlistmodel.html#subclassing tells you that you must do?

      C 1 Reply Last reply
      0
      • C Offline
        C Offline
        ceydasimsekk
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • JonBJ JonB

          @ceydasimsekk
          Please post code not screenshots.

          So have you done what https://doc.qt.io/qt-6/qabstractlistmodel.html#subclassing tells you that you must do?

          C Offline
          C Offline
          ceydasimsekk
          wrote on last edited by
          #4

          @JonB
          sorry i'm new here

          JonBJ 1 Reply Last reply
          0
          • C ceydasimsekk

            @JonB
            sorry i'm new here

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by
            #5

            @ceydasimsekk Whether you are new or not you likely have not done what that link tells you that you need to do.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Hi,

              Did you implement all the required pure virtual methods from the base class ?
              Without doing that, you class is also an abstract class.

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

              C 1 Reply Last reply
              0
              • SGaistS SGaist

                Hi,

                Did you implement all the required pure virtual methods from the base class ?
                Without doing that, you class is also an abstract class.

                C Offline
                C Offline
                ceydasimsekk
                wrote on last edited by
                #7

                @SGaist Yes,thank you very much I solved it.

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Great !

                  Then please mark the thread as solved so other forum users may know a solution has been found :-)

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

                  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