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. Can I get rid of the *.ui files?
QtWS25 Last Chance

Can I get rid of the *.ui files?

Scheduled Pinned Locked Moved Unsolved General and Desktop
cmakecode editorcppclion-ide
4 Posts 3 Posters 1.4k 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.
  • B Offline
    B Offline
    BDC_Patrick
    wrote on 25 Oct 2021, 19:26 last edited by BDC_Patrick
    #1

    Hi there..

    I managed to get QT5 to run in Clion, using Cmake.

    Means, I decided to do a clean code Project only, without the Usage of the QT Designer and its *.ui Files.

    Sow.. I tried to search for, how I manage to use qt without the need of those files.. but all I found are masses of articles about, how to restore them, when they get deleted/lost/corrupted.. but not, how to make a Window Class without them 😅

    I mean.. I can create a whole UI class.. with UI, header and source file.. but never will edit the UI.. which means.. it is a waste of space.. so..

    Can someone push me in the right direction?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 25 Oct 2021, 19:30 last edited by
      #2

      Hi,

      Quite a lot of examples in the Qt documentation do not make use of Designer at all. You can get started with them.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      3
      • J Offline
        J Offline
        JonB
        wrote on 25 Oct 2021, 19:33 last edited by
        #3

        If you want to use Qt Designer to design your UI you will want to use .ui files.

        You do not have to use Designer or its .ui files. You can write code to create widgets and set their attributes. That's what code examples in the Qt documentation or on the Internet show.

        In fact, if you look at the files in your project, when you build it runs uic program to process the .ui files and produce a ui_....h file. That is the full C++ code to create your designer widgets. If you look through that you can see exactly what code you could write instead of using the Designer and .ui files.

        1 Reply Last reply
        4
        • B Offline
          B Offline
          BDC_Patrick
          wrote on 2 Nov 2021, 10:29 last edited by
          #4

          Thanks Guys.. helped me out alot :D

          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