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. Ui or MainWindow has not been declared

Ui or MainWindow has not been declared

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 913 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.
  • B Offline
    B Offline
    BartoszT
    wrote on 18 Oct 2019, 19:04 last edited by
    #1

    QT has not been declared.png
    Hello, I have a problem as seen above, the "mainwindow.h" header file is added, and the Ui :: MainWindow green color confirms this. I don't understand what the problem is.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 18 Oct 2019, 19:46 last edited by
      #2

      Hi
      The UI part is declared in
      #include "ui_mainwindow.h"
      The normal.h include forwards it
      namespace Ui { class MainWindow; }
      but its first fully defined in .cpp as it includes the
      #include "ui_mainwindow.h"

      B 1 Reply Last reply 18 Oct 2019, 21:18
      2
      • M mrjj
        18 Oct 2019, 19:46

        Hi
        The UI part is declared in
        #include "ui_mainwindow.h"
        The normal.h include forwards it
        namespace Ui { class MainWindow; }
        but its first fully defined in .cpp as it includes the
        #include "ui_mainwindow.h"

        B Offline
        B Offline
        BartoszT
        wrote on 18 Oct 2019, 21:18 last edited by
        #3

        @mrjj Thanks, it works.

        1 Reply Last reply
        0

        1/3

        18 Oct 2019, 19:04

        • Login

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