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. Run Dialog without external files
QtWS25 Last Chance

Run Dialog without external files

Scheduled Pinned Locked Moved General and Desktop
dialogexternalfilesunnecessary
2 Posts 2 Posters 983 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.
  • T Offline
    T Offline
    t0msk
    wrote on last edited by t0msk
    #1

    Hello, i woud like to create Dialog which shows when program starts. This Dialog check if all external files is existing and check md5 hash od this files (if they arent corrupted or modified by user), check newest version of program etc... And problem is that if i run program it loads ALL Qt dlls which i am using in whole program, I would like to make that this Dialog runs without any external files (necessary files to run program like a QCore and QGui could be loaded in exe file) OR Make that this Dialog loads only QCore and QGui at start program and when control finish than program loads remaining Qt dlls and starts MainWindow (main porgram).

    If you have any other ideas you can post it :)

    Thank you

    Student who loves C/C++

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      You can't load Qt dlls when you want to simply because they are linked to your program and need to be resolved at startup. That's just how it works. If you were to load Qt dlls when you wanted (e.g. using QLibrary) you would have to also manually resolve addresses of all functions and classes. It's possible but just impractical at this scale.

      But here are two ideas what you could do:

      One way would be to split the app in two. First one would be the loader (the dialog) and it would use QProcess to start the main app when it finishes its work. Handy for updating the main app too as it's a separate file.

      The other idea would be to make your main app a shared library and load it dynamically with QLibrary at the right time. Same benefit as above except an exe and a library instead of two exes.

      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