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. Warnings.

Warnings.

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 4 Posters 1.2k Views 1 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.
  • S Offline
    S Offline
    Stevendragoes
    wrote on last edited by
    #1

    Hi All, when I try to compile and run the program, it gives me the following warning. Heres the screenshot.
    0a608c74-e361-451b-a698-54379f968d82-image.png

    I understand that warnings can be ignored but should I be concerned about the above warnings?

    JonBJ J.HilkJ Pl45m4P 3 Replies Last reply
    0
    • S Offline
      S Offline
      Stevendragoes
      wrote on last edited by
      #7

      Its alright. Hi All @J-Hilk @JonB and @Pl45m4 I have solved the situations.

      I have to put 3 lines

          qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1");
          qputenv("QT_SCREEN_SCALE_FACTORS", "1");
          qputenv("QT_SCALE_FACTOR", "1");
      

      in the main.cpp file and in whereever I want to create a new window from my application.

      1 Reply Last reply
      0
      • S Stevendragoes

        Hi All, when I try to compile and run the program, it gives me the following warning. Heres the screenshot.
        0a608c74-e361-451b-a698-54379f968d82-image.png

        I understand that warnings can be ignored but should I be concerned about the above warnings?

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by JonB
        #2

        @Stevendragoes
        As you say it's only a warning, but, yes, anything "deprecated" is worthy of being changed over. A future release of Qt may remove support for something "deprecated", and then you would have to act on it, so why not get it done now?

        S 2 Replies Last reply
        4
        • S Stevendragoes

          Hi All, when I try to compile and run the program, it gives me the following warning. Heres the screenshot.
          0a608c74-e361-451b-a698-54379f968d82-image.png

          I understand that warnings can be ignored but should I be concerned about the above warnings?

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

          @Stevendragoes said in Warnings.:

          I understand that warnings can be ignored but should I be concerned about the above warnings?

          Yes, same way as you can go on without food. You'll be fine for a while but eventually everything collapses!

          therefore

          DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000

          is your friend ;)

          In all honesty, you can go with ignoring it, or if you like a clean console output, deactivate that particular warning via removing DEFINES += QT_DEPRECATED_WARNINGS from your project file.

          But IMHO always handle warnings as errors. Your future self will thank you for it!


          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
          3
          • S Stevendragoes

            Hi All, when I try to compile and run the program, it gives me the following warning. Heres the screenshot.
            0a608c74-e361-451b-a698-54379f968d82-image.png

            I understand that warnings can be ignored but should I be concerned about the above warnings?

            Pl45m4P Online
            Pl45m4P Online
            Pl45m4
            wrote on last edited by
            #4

            @Stevendragoes

            This warning contains also the solution. Replace QT_DEVICE_PIXEL_RATIO with one of the suggested modes or vars. Then the warning should be gone.


            If debugging is the process of removing software bugs, then programming must be the process of putting them in.

            ~E. W. Dijkstra

            S 1 Reply Last reply
            2
            • JonBJ JonB

              @Stevendragoes
              As you say it's only a warning, but, yes, anything "deprecated" is worthy of being changed over. A future release of Qt may remove support for something "deprecated", and then you would have to act on it, so why not get it done now?

              S Offline
              S Offline
              Stevendragoes
              wrote on last edited by
              #5

              @JonB Hello I am using QT 5.12.6 the Latest LTS for Open Source Version for my own Project. So, I am not sure why it is giving me this error

              @J-Hilk I have put the

              DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000
              

              into the .pro file and it still gives me the error. I have also removed the DEFINES+= QT_DEPRECATED WARNINGS
              from my .pro file.

              However, it is still giving me the warnings. Any idea why? I have also restarted the QT Community after I made the changes

              J.HilkJ 1 Reply Last reply
              0
              • Pl45m4P Pl45m4

                @Stevendragoes

                This warning contains also the solution. Replace QT_DEVICE_PIXEL_RATIO with one of the suggested modes or vars. Then the warning should be gone.

                S Offline
                S Offline
                Stevendragoes
                wrote on last edited by
                #6

                @Pl45m4 How can I do so?

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  Stevendragoes
                  wrote on last edited by
                  #7

                  Its alright. Hi All @J-Hilk @JonB and @Pl45m4 I have solved the situations.

                  I have to put 3 lines

                      qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1");
                      qputenv("QT_SCREEN_SCALE_FACTORS", "1");
                      qputenv("QT_SCALE_FACTOR", "1");
                  

                  in the main.cpp file and in whereever I want to create a new window from my application.

                  1 Reply Last reply
                  0
                  • JonBJ JonB

                    @Stevendragoes
                    As you say it's only a warning, but, yes, anything "deprecated" is worthy of being changed over. A future release of Qt may remove support for something "deprecated", and then you would have to act on it, so why not get it done now?

                    S Offline
                    S Offline
                    Stevendragoes
                    wrote on last edited by
                    #8

                    @JonB said in Warnings.:

                    @Stevendragoes
                    As you say it's only a warning, but, yes, anything "deprecated" is worthy of being changed over. A future release of Qt may remove support for something "deprecated", and then you would have to act on it, so why not get it done now?

                    How can i get it done for something that is deprecated?

                    1 Reply Last reply
                    0
                    • S Stevendragoes

                      @JonB Hello I am using QT 5.12.6 the Latest LTS for Open Source Version for my own Project. So, I am not sure why it is giving me this error

                      @J-Hilk I have put the

                      DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000
                      

                      into the .pro file and it still gives me the error. I have also removed the DEFINES+= QT_DEPRECATED WARNINGS
                      from my .pro file.

                      However, it is still giving me the warnings. Any idea why? I have also restarted the QT Community after I made the changes

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

                      @Stevendragoes said in Warnings.:

                      I have put the
                      DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000

                      into the .pro file and it still gives me the error.

                      I said remove it, not add is 😏
                      might have been se issue 🙈


                      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.

                      S 1 Reply Last reply
                      1
                      • J.HilkJ J.Hilk

                        @Stevendragoes said in Warnings.:

                        I have put the
                        DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000

                        into the .pro file and it still gives me the error.

                        I said remove it, not add is 😏
                        might have been se issue 🙈

                        S Offline
                        S Offline
                        Stevendragoes
                        wrote on last edited by
                        #10

                        @J-Hilk said in Warnings.:

                        @Stevendragoes said in Warnings.:

                        I have put the
                        DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000

                        into the .pro file and it still gives me the error.

                        I said remove it, not add is 😏
                        might have been se issue 🙈

                        LOL okok I will remove it. I thought Disable means like it will remove the warnings

                        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