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. Where is ui_mainwindow.h in Qt designer
QtWS25 Last Chance

Where is ui_mainwindow.h in Qt designer

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 5 Posters 5.5k 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.
  • R Offline
    R Offline
    ranshalit
    wrote on 7 Apr 2017, 05:27 last edited by
    #1

    Hello,

    It seems that not all generated file are part of project files which are viewed with designer.
    , for example: ui_mainwindow.h .
    Is there any way to add these files , or is it on purpose ?

    Thank you,
    Ran

    K 1 Reply Last reply 7 Apr 2017, 05:47
    0
    • R ranshalit
      7 Apr 2017, 05:27

      Hello,

      It seems that not all generated file are part of project files which are viewed with designer.
      , for example: ui_mainwindow.h .
      Is there any way to add these files , or is it on purpose ?

      Thank you,
      Ran

      K Offline
      K Offline
      kshegunov
      Moderators
      wrote on 7 Apr 2017, 05:47 last edited by
      #2

      It's a generated file, and as such it's not shown in Creator. As for the Designer it has no ability to open C++ source files, only it's own .ui XML format.

      Read and abide by the Qt Code of Conduct

      1 Reply Last reply
      4
      • M Offline
        M Offline
        mrjj
        Lifetime Qt Champion
        wrote on 7 Apr 2017, 06:01 last edited by
        #3

        Hi
        The ui_xxx files are generated by the uic.exe tool
        by reading UI files. they are not included into the project file but
        referenced from the cpp file. Like
        #include "ui_MainWindow.h"

        This is as intended. You should have no need to add or alter them.

        1 Reply Last reply
        4
        • A Offline
          A Offline
          adamchalkley2018
          wrote on 11 Mar 2018, 21:02 last edited by
          #4

          ohh ok so behind the scenes QT is creating this header and UI object for us?

          A 1 Reply Last reply 11 Mar 2018, 21:09
          0
          • A adamchalkley2018
            11 Mar 2018, 21:02

            ohh ok so behind the scenes QT is creating this header and UI object for us?

            A Offline
            A Offline
            aha_1980
            Lifetime Qt Champion
            wrote on 11 Mar 2018, 21:09 last edited by
            #5

            @adamchalkley2018 said in Where is ui_mainwindow.h in Qt designer:

            ohh ok so behind the scenes QT is creating this header and UI object for us?

            The .ui file is generated by a wizard (it's a template) and can be edited later with QtDesigner (also integrated in QtCreator).

            From the .ui file a ui_object.h file is generated by uic and later compiled by the C++ compiler and linked to your executable.

            Hope that explains it a bit :)

            Qt has to stay free or it will die.

            1 Reply Last reply
            2

            • Login

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