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. Creating QT class object in normal cpp class.

Creating QT class object in normal cpp class.

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 4 Posters 673 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.
  • ashajgA Offline
    ashajgA Offline
    ashajg
    wrote on last edited by ashajg
    #1

    Hi guys,
    Consider their are two classes one is normal cpp class say abc and other is extended from qobject say xyz.

    Now I want to call a function of class xyz from abc.
    I am trying to create object of xyz in abc but it is throwing error.
    How can I do this?

    Thanks and Regards
    Ashish Ajgaonkar

    Pablo J. RoginaP jsulmJ 2 Replies Last reply
    0
    • ashajgA ashajg

      Hi guys,
      Consider their are two classes one is normal cpp class say abc and other is extended from qobject say xyz.

      Now I want to call a function of class xyz from abc.
      I am trying to create object of xyz in abc but it is throwing error.
      How can I do this?

      Thanks and Regards
      Ashish Ajgaonkar

      Pablo J. RoginaP Offline
      Pablo J. RoginaP Offline
      Pablo J. Rogina
      wrote on last edited by
      #2

      @ashajg said in Creating QT class object in normal cpp class.:

      it is throwing error.

      What error? This is not a magicians' forum...

      Upvote the answer(s) that helped you solve the issue
      Use "Topic Tools" button to mark your post as Solved
      Add screenshots via postimage.org
      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      5
      • ashajgA ashajg

        Hi guys,
        Consider their are two classes one is normal cpp class say abc and other is extended from qobject say xyz.

        Now I want to call a function of class xyz from abc.
        I am trying to create object of xyz in abc but it is throwing error.
        How can I do this?

        Thanks and Regards
        Ashish Ajgaonkar

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @ashajg said in Creating QT class object in normal cpp class.:

        but it is throwing error

        Why don't you post the error?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        4
        • ashajgA Offline
          ashajgA Offline
          ashajg
          wrote on last edited by
          #4

          Hi @Pablo-J-Rogina @jsulm

          Sorry for the mistake.
          Actually the error was unknown type name it was throwing when I was trying to create the object0_1561717140968_qt.PNG

          But it is solved Now.

          1 Reply Last reply
          1
          • Pradeep KumarP Offline
            Pradeep KumarP Offline
            Pradeep Kumar
            wrote on last edited by
            #5

            @ashajg
            nice to hear u found out the error
            can u mark as solved the topic

            Thanks,

            Pradeep Kumar
            Qt,QML Developer

            1 Reply Last reply
            2

            • Login

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