Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Unsolved why the size of my qt file is very big?

    General and Desktop
    5
    16
    3567
    Loading More Posts
    • 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.
    • RIVOPICO
      RIVOPICO last edited by

      the size of my compiled program in qt is very big it's like 27mB. it's there some way to make it more light?

      J.Hilk jsulm 2 Replies Last reply Reply Quote 0
      • J.Hilk
        J.Hilk Moderators @RIVOPICO last edited by

        @RIVOPICO
        a very generic question, impossible to say without more information.

        My guess would be, build it in release mode.

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

        Qt Needs YOUR vote: https://bugreports.qt.io/browse/QTQAINFRA-4121


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

        1 Reply Last reply Reply Quote 4
        • jsulm
          jsulm Lifetime Qt Champion @RIVOPICO last edited by

          @RIVOPICO Did you build in debug mode? If so build in release mode.

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

          RIVOPICO 1 Reply Last reply Reply Quote 3
          • RIVOPICO
            RIVOPICO @jsulm last edited by

            @jsulm i build with static libraries using qt in debug mode and release i can too. but the size is very big. its not possible to reduce the size or make my application more light?

            jsulm JonB J.Hilk 3 Replies Last reply Reply Quote 0
            • jsulm
              jsulm Lifetime Qt Champion @RIVOPICO last edited by

              @RIVOPICO said in why the size of my qt file is very big?:

              static libraries

              Well, that explains it. You can't expect your executable to be small if you use static libs. Why is it an issue if your executable is 27MB? Do you use it on a very limited hardware?
              Use release mode then it should become smaller (but still bigger than using shared libraries).

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

              1 Reply Last reply Reply Quote 3
              • JonB
                JonB @RIVOPICO last edited by

                @RIVOPICO said in why the size of my qt file is very big?:

                @jsulm i build with static libraries using qt in debug mode and release i can too. but the size is very big. its not possible to reduce the size or make my application more light?

                Yes, you can certainly make it smaller by using dynamic libraries instead of static ones! You may get a size reduction in Release instead of Debug mode.

                1 Reply Last reply Reply Quote 0
                • J.Hilk
                  J.Hilk Moderators @RIVOPICO last edited by

                  @RIVOPICO Theres also Qt Lite if you're interested in that.

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

                  Qt Needs YOUR vote: https://bugreports.qt.io/browse/QTQAINFRA-4121


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

                  RIVOPICO 1 Reply Last reply Reply Quote 3
                  • RIVOPICO
                    RIVOPICO @J.Hilk last edited by

                    @J.Hilk how much is the difference between qt lite and normal? and for using static libraries i must to setup it again or can use the currently static configuration installed in my pc and use it?

                    1 Reply Last reply Reply Quote 0
                    • RIVOPICO
                      RIVOPICO last edited by

                      in qt 5.9 can i use msvc static if i did it with other version of qt? in my case i have qt 5.6

                      1 Reply Last reply Reply Quote 0
                      • SGaist
                        SGaist Lifetime Qt Champion last edited by

                        Hi,

                        With Qt Lite you can remove everything you don't use and that is not a dependency of what you are using. So it might be a lot.

                        If you want to use a Qt 5.9 static build, then you'll have to build it yourself. Keep in mind the licensing implication of using a static build of Qt.

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

                        RIVOPICO 1 Reply Last reply Reply Quote 1
                        • RIVOPICO
                          RIVOPICO @SGaist last edited by

                          @SGaist ok thanks. but i have the static compilation with msvc2013 so i can import to qt 5.9?

                          1 Reply Last reply Reply Quote 0
                          • SGaist
                            SGaist Lifetime Qt Champion last edited by

                            What do you mean by import ?

                            You either build your application with your static 5.6 or with your current 5.9.

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

                            RIVOPICO 1 Reply Last reply Reply Quote 0
                            • RIVOPICO
                              RIVOPICO @SGaist last edited by

                              @SGaist i build qt 5.6 static with msvc2013 and it's static. If i use a new version of qt 5.9 i can use my static compiler because maybe i'm wrong but msvc static is the compiler not qt. So like i have msvc 2013 static maybe i can use it on the new version of qt without repeating all the process not sure.

                              1 Reply Last reply Reply Quote 0
                              • SGaist
                                SGaist Lifetime Qt Champion last edited by

                                There's no such thing as a "static compiler". You compiled a static version of Qt which is a set of libraries., So when building your application with that version of Qt, you'll be linking to it.

                                The version of Qt 5.9 that you installed is a set of shared libraries. So if you want to link to a 5.9 statically, you will first have to compile it statically.

                                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 Reply Quote 0
                                • RIVOPICO
                                  RIVOPICO last edited by

                                  then i prefer to search other solution to qt lite. because reconfigure of new is for sure difficult again.

                                  1 Reply Last reply Reply Quote 0
                                  • RIVOPICO
                                    RIVOPICO last edited by

                                    i have installed qt 5.7 but like you say must to do everything again, so prefer to search other way. i will try if get other way if not i will must to be happy with the size.

                                    1 Reply Last reply Reply Quote 0
                                    • First post
                                      Last post