title: "undefined class" Qt/C++
body: <p>I recently started programming in C ++ and am having some difficulties in relation to the exchange of data between classes.
  I searched many tutorials and examples, but none worked. I finally decided to ask for help because I do not know what do ...</p>
  
  <p>PS: I want to call <strong>keyPressEvent</strong> function from my B (solEditor) class</p>
  
  <p>thanks.</p>
  
  <p><strong>addons/soleditor.h (class)</strong></p>
  
  <pre><code>#include &lt;Qsci/qsciscintilla.h&gt;
  #include &lt;QWidget&gt;
  #include &lt;QKeyEvent&gt;
  
  class Editor; // main class
  class solEditor : public QsciScintilla
  {
  
  public:
      explicit solEditor(QWidget *parent = 0);
      Editor editor; // error &lt;&lt; 
  
  protected:
      void keyPressEvent(QKeyEvent *e);
  
  };
  </code></pre>
  
  <p><strong>editor.h (main window)</strong></p>
  
  <pre><code>#include &lt;QMainWindow&gt;
  #include "about.h"
  #include "data.h"
  #include "addons/codeeditor.h"
  #include "addons/highlighter.h"
  #include "addons/soleditor.h"
  #include "plugins/headergenerator.h"
  #include "plugins/updatescreen.h"
  
  namespace Ui {
  class Editor;
  }
  
  class solEditor;
  
  class Editor : public QMainWindow
  {
  
      Q_OBJECT
  
  solEditor *sE;
  
  public:
      QsciScintilla* ce;
      Highlighter *Hl;
      solEditor *e;
      Ui::Editor *ui;
      explicit Editor(QWidget *parent = 0);
      ~Editor();
  
  public slots:
      void on_KeyPress(QKeyEvent *e);
  
  };
  </code></pre>
  
  <p><strong>Error:</strong></p>
  
  <blockquote>
    <blockquote>
      <p>SOLEditor\addons\soleditor.h:14: error: C2079: 'solEditor::editor' uses undefined class 'Editor'</p>
    </blockquote>
  </blockquote>