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. ProgressBar appearance change after deploying application
QtWS25 Last Chance

ProgressBar appearance change after deploying application

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 4 Posters 435 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.
  • A Offline
    A Offline
    Amazonasmann
    wrote on last edited by
    #1

    Hi,
    my QProgressBar changes appearance after I deploy my application (By deploying I mean copying all necessary dlls and .exe file to some other PC).

    In Qt Creator:

    0_1568641114229_efed1379-ea00-44f2-a5a0-85e2300b1cc5-image.png
    After Deploy:
    0_1568641110129_53833b33-5371-43fe-9ae7-8caf6b811b4c-image.png

    I have an empty qt.conf file next to my .exe file and copy some DLLs ( /platforms/qwindows.dll ) to the folder of my executable.
    I assume that I am missing some theme or DLL to achieve what I want.
    What do I need to deploy with my .exe to get the "green progressbar" ?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Did you already use windeployqt ?

      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
      • A Offline
        A Offline
        Amazonasmann
        wrote on last edited by
        #3

        Hi,
        no I did not use windeployqt ( I didn't know what this is tbh). A quick google search showed me the documentation which raises a question: Can I use this with CMake?

        J.HilkJ 1 Reply Last reply
        0
        • A Amazonasmann

          Hi,
          no I did not use windeployqt ( I didn't know what this is tbh). A quick google search showed me the documentation which raises a question: Can I use this with CMake?

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #4

          @amazonasmann as it is a standalone console application and you pass the finished executable as a parameter, I see no reason why the original build system should matter


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          1 Reply Last reply
          2
          • A Offline
            A Offline
            Amazonasmann
            wrote on last edited by
            #5

            Thank you @SGaist I found my solution. I used windeployqt to copy all necessary DLLs and as it turns out I was missing the "styles/qwindowsvistastyle.dll" (This is just a guess but most probably this is the case).

            In CMake I added the following:

            
            # Retrieve the absolute path to qmake and then use that path to find
            # the binaries
            get_target_property(_qmake_executable Qt5::qmake IMPORTED_LOCATION)
            get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY)
            find_program(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${_qt_bin_dir}")
            
            add_custom_command(TARGET MyApp POST_BUILD
                COMMAND "${CMAKE_COMMAND}" -E
                    env PATH="${_qt_bin_dir}" "${WINDEPLOYQT_EXECUTABLE}"
                        "$<TARGET_FILE:MyApp>"
                COMMENT "Running windeployqt..."
            )
            
            

            Which adds all necessary dependencies to the folder.

            Pablo J. RoginaP 1 Reply Last reply
            1
            • A Amazonasmann

              Thank you @SGaist I found my solution. I used windeployqt to copy all necessary DLLs and as it turns out I was missing the "styles/qwindowsvistastyle.dll" (This is just a guess but most probably this is the case).

              In CMake I added the following:

              
              # Retrieve the absolute path to qmake and then use that path to find
              # the binaries
              get_target_property(_qmake_executable Qt5::qmake IMPORTED_LOCATION)
              get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY)
              find_program(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${_qt_bin_dir}")
              
              add_custom_command(TARGET MyApp POST_BUILD
                  COMMAND "${CMAKE_COMMAND}" -E
                      env PATH="${_qt_bin_dir}" "${WINDEPLOYQT_EXECUTABLE}"
                          "$<TARGET_FILE:MyApp>"
                  COMMENT "Running windeployqt..."
              )
              
              

              Which adds all necessary dependencies to the folder.

              Pablo J. RoginaP Offline
              Pablo J. RoginaP Offline
              Pablo J. Rogina
              wrote on last edited by
              #6

              @amazonasmann said in ProgressBar appearance change after deploying application:

              I found my solution

              Great. If your issue is really solved, please don't forget to mark your post as such! Thanks

              Upvote the answer(s) that helped you solve the issue
              Use "Topic Tools" button to mark your post as Solved
              Add screenshots via postimage.org
              Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

              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