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 to see MOC and UI generatd C++ code?
Forum Updated to NodeBB v4.3 + New Features

How to see MOC and UI generatd C++ code?

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 1.5k Views 3 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.
  • HarbH Offline
    HarbH Offline
    Harb
    wrote on last edited by
    #1

    Hi! Now I am working on my first Qt project in Qt Creator. I use Qt Designer to make UI. Now I am a little bit confused about the way how MOC, Qt Designer and my C++ code are interacting with each other. So I want to see C++ code generated by UIC and MOC for better understandig, what really go on behinde the scene. So the question is how I can see these source files?

    1 Reply Last reply
    0
    • JohanSoloJ Offline
      JohanSoloJ Offline
      JohanSolo
      wrote on last edited by
      #2

      You can simply open those files with your favourite text editor and get a look...

      `They did not know it was impossible, so they did it.'
      -- Mark Twain

      1 Reply Last reply
      1
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3

        They are located in the build folder. for say mainwindow, there will be a ui_mainwindow.h

        1 Reply Last reply
        1
        • HarbH Offline
          HarbH Offline
          Harb
          wrote on last edited by
          #4

          Thanks, I just should have checked build folder :)

          mrjjM 1 Reply Last reply
          0
          • HarbH Harb

            Thanks, I just should have checked build folder :)

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @Harb
            Well I assumed it would be something secret hiding away in dark corner of the toolchain until someday
            i stumbled upon the ui_* files.
            Its a great way to learn how to hook things up from code.
            And since its just normal c++ and objects, you can mix both UI files and
            code setup.

            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