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 Namespace
Forum Updated to NodeBB v4.3 + New Features

Ui Namespace

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.5k 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.
  • J Offline
    J Offline
    Jyang772
    wrote on 20 Jul 2014, 23:36 last edited by
    #1

    Are these two namespaces the same? The Ui namespace in Mainwindow.h and Ui_Mainwindow.h.

    If not how does the compiler know that MainWindow in the namespace Ui in MainWindow.h is actually a forward declaration of Ui::MainWindow in Ui_Mainwindow.h

    In MainWindow.h
    @
    namespace Ui {
    class MainWindow; //Forward declaration of MainWindow from ui_MainWindow.h
    }@

    In ui_MainWindow.h
    @
    namespace Ui {
    class MainWindow: public Ui_MainWindow {};
    } // namespace Ui
    @

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andreyc
      wrote on 21 Jul 2014, 05:45 last edited by
      #2

      Yes, Ui namespace is the same in both files if the files are in the same project.

      1 Reply Last reply
      0
      • J Offline
        J Offline
        Jyang772
        wrote on 21 Jul 2014, 05:47 last edited by
        #3

        Okay thank you. I know how namespaces work. Just got a bit confused since this is the first time I have used Designer to create a new Form for me.

        1 Reply Last reply
        0

        1/3

        20 Jul 2014, 23:36

        • 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