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. why do I need to claim this class in h file?
Forum Updated to NodeBB v4.3 + New Features

why do I need to claim this class in h file?

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

    My h file is like this:

    • #ifndef WINDOW_H
      #define WINDOW_H
      #include <QMainWindow>
      #include <QUrl>
      #include <QWebElement>
      class QTreeWidgetItem; //====================================> why do I need this line?
      #include "ui_window.h"
      class Window : public QMainWindow, private Ui::Window
      {
      Q_OBJECT
      public:
      Window(QWidget *parent = 0);
      void setUrl(const QUrl &url);
      public slots:
      void on_webView_loadFinished();
      private:
      void examineChildElements(const QWebElement &parentElement,
      QTreeWidgetItem *parentItem);
      };
      #endif
    1 Reply Last reply
    0
    • David.GD Offline
      David.GD Offline
      David.G
      wrote on last edited by
      #2

      It's a forward declaration. (a bit more about it here and here

      sheepsS 1 Reply Last reply
      1
      • David.GD David.G

        It's a forward declaration. (a bit more about it here and here

        sheepsS Offline
        sheepsS Offline
        sheeps
        wrote on last edited by
        #3

        @David.G Thank you!

        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