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. How Qt translates ui to c++ code?
Forum Updated to NodeBB v4.3 + New Features

How Qt translates ui to c++ code?

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 4 Posters 306 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.
  • O Offline
    O Offline
    OxiD
    wrote on last edited by aha_1980
    #1

    I'm trying to find .cpp file which one is used for ui to c++ code translation. Have found QWidgetFactory, but this one is for an older version. So which one Qt uses now?

    W 1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      The code for uic is in qtbase\src\tools\uic

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      6
      • PsnarfP Offline
        PsnarfP Offline
        Psnarf
        wrote on last edited by
        #3

        The code for translating your project's ui into c++ code is in your project's build directory, initially set to something like build-myProject-Desktop_Qt_5_15_2_* in the directory containing your project. The Form header file, such as, mainwindow.h, widget.h, dialog.h, myForm.h, contains the class definition for your ui Form.

        1 Reply Last reply
        0
        • O OxiD

          I'm trying to find .cpp file which one is used for ui to c++ code translation. Have found QWidgetFactory, but this one is for an older version. So which one Qt uses now?

          W Offline
          W Offline
          wrosecrans
          wrote on last edited by
          #4

          @OxiD Christian Ehrlicher mentioned where the source is. But I am curious why you want to know? Is there some underlying problem you are trying to solve? Perhaps someone could give you more useful information if you mentioned why you are trying to dig into uic. It's not something developers generally need to touch.

          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