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 does qt by default #include a ui_<projectname>.h file in the cpp file even though I don't see it in my project directory?
Forum Updated to NodeBB v4.3 + New Features

Why does qt by default #include a ui_<projectname>.h file in the cpp file even though I don't see it in my project directory?

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

    0a95f440-05f9-4aa5-af8d-d28c246f06c9-image.png

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by Chris Kawa
      #2

      Hi, welcome to the forum.

      This is a file automatically generated by the uic tool for designer classes. You have a mafs.ui designer file in your project and from that a ui_mafs.h file is generated during project build.

      That file is generated in the build directory when you compile the project. You can see it and its contents there. It contains the C++ code for that designer class and implementation of that setupUi() method that is called in your class constructor.

      Also it's not project name. It's the .ui file name. It just so happens that it is named the same as the project. If you had multiple .ui files in your project you would get a ui_*.h file for each of them.

      1 Reply Last reply
      4
      • S Offline
        S Offline
        Semu112
        wrote on last edited by
        #3

        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