Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. C++ Gurus
  4. multiple inheritance ?

multiple inheritance ?

Scheduled Pinned Locked Moved Unsolved C++ Gurus
3 Posts 2 Posters 358 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.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    Will multiple inheritance full-fill the task ??

    I am starting another thread to ask SIMPLE yes / no questions, IF that is an issue, I will delete ALL after I get the answers.

    I have this class

    class Console : public QPlainTextEdit
    {
    Q_OBJECT
    .....

    it does not have "status bar" as a method and there is no "ui" form too.

    can I code multiple inheritance class coded this way :

    class Console_ext : public QPlainTextEdit, public QMainWindow
    {
    Q_OBJECT
    .....

    Yes / No ?

    if NO
    then ...
    how

    PS
    Reason for reusing the original class QPlainTextEdit - invested time in coding it to my spec.

    Christian EhrlicherC 2 Replies Last reply
    0
    • A Anonymous_Banned275

      Will multiple inheritance full-fill the task ??

      I am starting another thread to ask SIMPLE yes / no questions, IF that is an issue, I will delete ALL after I get the answers.

      I have this class

      class Console : public QPlainTextEdit
      {
      Q_OBJECT
      .....

      it does not have "status bar" as a method and there is no "ui" form too.

      can I code multiple inheritance class coded this way :

      class Console_ext : public QPlainTextEdit, public QMainWindow
      {
      Q_OBJECT
      .....

      Yes / No ?

      if NO
      then ...
      how

      PS
      Reason for reusing the original class QPlainTextEdit - invested time in coding it to my spec.

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @AnneRanch said in multiple inheritance ?:

      if NO
      then ...
      how

      Already answered here on how to solve it: https://forum.qt.io/topic/155559/another-reuse-question/3

      You can not inherit from multiple QObject instances.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      4
      • A Anonymous_Banned275

        Will multiple inheritance full-fill the task ??

        I am starting another thread to ask SIMPLE yes / no questions, IF that is an issue, I will delete ALL after I get the answers.

        I have this class

        class Console : public QPlainTextEdit
        {
        Q_OBJECT
        .....

        it does not have "status bar" as a method and there is no "ui" form too.

        can I code multiple inheritance class coded this way :

        class Console_ext : public QPlainTextEdit, public QMainWindow
        {
        Q_OBJECT
        .....

        Yes / No ?

        if NO
        then ...
        how

        PS
        Reason for reusing the original class QPlainTextEdit - invested time in coding it to my spec.

        Christian EhrlicherC Offline
        Christian EhrlicherC Offline
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @AnneRanch Are we now in the "Remove the threads I don't like" phase again?

        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
        Visit the Qt Academy at https://academy.qt.io/catalog

        1 Reply Last reply
        2
        • Christian EhrlicherC Christian Ehrlicher locked this topic on

        • Login

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