Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Brainstorm
  4. Why doesn’t Qt for C++ support hot reloading like other modern UI frameworks?
Forum Updated to NodeBB v4.3 + New Features

Why doesn’t Qt for C++ support hot reloading like other modern UI frameworks?

Scheduled Pinned Locked Moved Unsolved Brainstorm
4 Posts 3 Posters 306 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.
  • Pete CarterP Offline
    Pete CarterP Offline
    Pete Carter
    wrote on last edited by Pete Carter
    #1

    In many modern GUI frameworks (like Flutter or React), hot reloading allows developers to see code changes reflected immediately in the running application — without recompiling the entire program.
    This saves time during development and preserves the current app state in memory.

    In contrast, when developing C++ applications with Qt, even small UI or logic changes require a full recompilation and restart of the app.

    Why hasn’t hot reloading been implemented for Qt C++ development?

    What technical challenges prevent this feature?

    Is it due to the compiled nature of C++?

    Would it ever be possible to add true hot reloading support to C++ Qt projects, similar to what interpreted or JIT-based frameworks can do?

    Can Cling help in that ?
    https://github.com/root-project/cling

    jeremy_kJ 1 Reply Last reply
    0
    • Pete CarterP Pete Carter

      In many modern GUI frameworks (like Flutter or React), hot reloading allows developers to see code changes reflected immediately in the running application — without recompiling the entire program.
      This saves time during development and preserves the current app state in memory.

      In contrast, when developing C++ applications with Qt, even small UI or logic changes require a full recompilation and restart of the app.

      Why hasn’t hot reloading been implemented for Qt C++ development?

      What technical challenges prevent this feature?

      Is it due to the compiled nature of C++?

      Would it ever be possible to add true hot reloading support to C++ Qt projects, similar to what interpreted or JIT-based frameworks can do?

      Can Cling help in that ?
      https://github.com/root-project/cling

      jeremy_kJ Offline
      jeremy_kJ Offline
      jeremy_k
      wrote on last edited by
      #2

      Are you looking for reloading of C++? That doesn't seem to be in the scope of Qt. The compiler would need to be involved. At a glance, an interpreter such as Cling would be unlikely to help unless everything reloadable was always run through it. C++ has no ABI, leaving each compiler to decide on interface semantics. Newly compiled/interpreted code would have to be adapted to the compiler, possibly including the specific version and compilation flags.

      • For QML, there's a history of hot reload projects. For example, from a few seconds on pick-your-search-engine, https://qml.guide/live-reloading-hot-reloading-qml/. I used an early version of QML Live, and found it useful for tweaking simple UIs. When the structure is complicated, time savings becomes questionable, and the risk of traversing invalid states is high.

      • For widgets from a .ui file, I haven't seen it, and guess that the typical level of C++ integration would make it highly unreliable. The same goes for QML reloading with anything beyond a trivial custom C++ integration.

      Asking a question about code? http://eel.is/iso-c++/testcase/

      1 Reply Last reply
      2
      • S Offline
        S Offline
        SimonSchroeder
        wrote on last edited by
        #3

        You are correct that this is because C++ is compiled. It is not too easy to replace functions inside a running executable. What happens if the new function is larger than the old one? It needs to go into a new place. This also means that all calls to the function need to be updated (or we need to replace the original function with a call to the new function). It gets even more complicated if functions are also inlined.

        There is a single project that allows you to do hot reloading with C++ (and thus certainly also with Qt): https://liveplusplus.tech/

        Pete CarterP 1 Reply Last reply
        1
        • S SimonSchroeder

          You are correct that this is because C++ is compiled. It is not too easy to replace functions inside a running executable. What happens if the new function is larger than the old one? It needs to go into a new place. This also means that all calls to the function need to be updated (or we need to replace the original function with a call to the new function). It gets even more complicated if functions are also inlined.

          There is a single project that allows you to do hot reloading with C++ (and thus certainly also with Qt): https://liveplusplus.tech/

          Pete CarterP Offline
          Pete CarterP Offline
          Pete Carter
          wrote on last edited by
          #4

          @SimonSchroeder

          There is a single project that allows you to do hot reloading with C++ (and thus certainly also with Qt): https://liveplusplus.tech/

          Only problem is that it's closed source

          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