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. Generating .h files from .ui files
Qt 6.11 is out! See what's new in the release blog

Generating .h files from .ui files

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 649 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.
  • B Offline
    B Offline
    Billiam
    wrote on last edited by
    #1

    Hi!

    I am new to Qt and have been reading that by generating a UI using the editor, a .h file will be generated with all of the necessary slots, signals, and connections. However, as I have been using the editor, I have noticed that no slots, signals, or connections are generated in the .h file. Are they supposed to auto-generate? Or do I have to code them by hand? Or, is there another way to auto-generate them that I have not yet read?

    Thank you!

    aha_1980A VRoninV 2 Replies Last reply
    0
    • B Billiam

      Hi!

      I am new to Qt and have been reading that by generating a UI using the editor, a .h file will be generated with all of the necessary slots, signals, and connections. However, as I have been using the editor, I have noticed that no slots, signals, or connections are generated in the .h file. Are they supposed to auto-generate? Or do I have to code them by hand? Or, is there another way to auto-generate them that I have not yet read?

      Thank you!

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi @Billiam,

      the tool to generate the ui_xxx.h file from xxx.ui is called uic. This tool is calley automatically during a proper build process.

      If you use QtCreator, it will work magically, as the project files will be set up properly.

      Regards

      Qt has to stay free or it will die.

      1 Reply Last reply
      3
      • B Billiam

        Hi!

        I am new to Qt and have been reading that by generating a UI using the editor, a .h file will be generated with all of the necessary slots, signals, and connections. However, as I have been using the editor, I have noticed that no slots, signals, or connections are generated in the .h file. Are they supposed to auto-generate? Or do I have to code them by hand? Or, is there another way to auto-generate them that I have not yet read?

        Thank you!

        VRoninV Offline
        VRoninV Offline
        VRonin
        wrote on last edited by
        #3

        @Billiam said in Generating .h files from .ui files:

        is there another way to auto-generate them that I have not yet read?

        There is https://doc.qt.io/qt-5/qobject.html#auto-connection that uic uses but i would never recommend for manual use

        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
        ~Napoleon Bonaparte

        On a crusade to banish setIndexWidget() from the holy land of Qt

        1 Reply Last reply
        3

        • Login

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