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 create header file for ui I downloaded?
Forum Updated to NodeBB v4.3 + New Features

How to create header file for ui I downloaded?

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 3 Posters 927 Views 2 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.
  • cerrC Offline
    cerrC Offline
    cerr
    wrote on last edited by
    #1

    Hi,

    I found a Python project built with PyQt and I would like to use its UI but in a C++ application. How do I generate its .h file?

    JKSHJ 1 Reply Last reply
    0
    • cerrC cerr

      Yeah, it's got a .ui file. But I need an .h file to create a makefile with cmake, don't I? So that my application can interface with the .ui... how do I establish the link otherwidse?
      Yeah, the project was licensed under GNU.

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #5

      @cerr said in How to create header file for ui I downloaded?:

      But I need an .h file to create a makefile with cmake, don't I?

      Nope. You ask CMake to automatically convert the .ui file to a .h file.

      • https://doc.qt.io/qt-5.12/qtwidgets-cmake-qt5-wrap-ui.html
      • https://doc.qt.io/qt-5/cmake-manual.html

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      cerrC 1 Reply Last reply
      4
      • cerrC cerr

        Hi,

        I found a Python project built with PyQt and I would like to use its UI but in a C++ application. How do I generate its .h file?

        JKSHJ Offline
        JKSHJ Offline
        JKSH
        Moderators
        wrote on last edited by
        #2

        @cerr said in How to create header file for ui I downloaded?:

        I found a Python project built with PyQt and I would like to use its UI but in a C++ application.

        Is the UI implemented using Python code, or does it have a *.ui file? If it haas a *.ui file, you can copy the file straight into your C++ project.

        Remember to check the PyQt project license.

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        1 Reply Last reply
        1
        • cerrC Offline
          cerrC Offline
          cerr
          wrote on last edited by
          #3

          Yeah, it's got a .ui file. But I need an .h file to create a makefile with cmake, don't I? So that my application can interface with the .ui... how do I establish the link otherwidse?
          Yeah, the project was licensed under GNU.

          jsulmJ JKSHJ 2 Replies Last reply
          0
          • cerrC cerr

            Yeah, it's got a .ui file. But I need an .h file to create a makefile with cmake, don't I? So that my application can interface with the .ui... how do I establish the link otherwidse?
            Yeah, the project was licensed under GNU.

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #4

            @cerr said in How to create header file for ui I downloaded?:

            But I need an .h file

            It's generated by uic.exe tool during building your app.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            3
            • cerrC cerr

              Yeah, it's got a .ui file. But I need an .h file to create a makefile with cmake, don't I? So that my application can interface with the .ui... how do I establish the link otherwidse?
              Yeah, the project was licensed under GNU.

              JKSHJ Offline
              JKSHJ Offline
              JKSH
              Moderators
              wrote on last edited by
              #5

              @cerr said in How to create header file for ui I downloaded?:

              But I need an .h file to create a makefile with cmake, don't I?

              Nope. You ask CMake to automatically convert the .ui file to a .h file.

              • https://doc.qt.io/qt-5.12/qtwidgets-cmake-qt5-wrap-ui.html
              • https://doc.qt.io/qt-5/cmake-manual.html

              Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

              cerrC 1 Reply Last reply
              4
              • JKSHJ JKSH

                @cerr said in How to create header file for ui I downloaded?:

                But I need an .h file to create a makefile with cmake, don't I?

                Nope. You ask CMake to automatically convert the .ui file to a .h file.

                • https://doc.qt.io/qt-5.12/qtwidgets-cmake-qt5-wrap-ui.html
                • https://doc.qt.io/qt-5/cmake-manual.html
                cerrC Offline
                cerrC Offline
                cerr
                wrote on last edited by
                #6

                @JKSH said in How to create header file for ui I downloaded?:

                @cerr said in How to create header file for ui I downloaded?:

                But I need an .h file to create a makefile with cmake, don't I?

                Nope. You ask CMake to automatically convert the .ui file to a .h file.

                • https://doc.qt.io/qt-5.12/qtwidgets-cmake-qt5-wrap-ui.html
                • https://doc.qt.io/qt-5/cmake-manual.html

                Ah, excellent, that's great! Thanks for this!

                1 Reply Last reply
                1

                • Login

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