Warnings.
-
Hi All, when I try to compile and run the program, it gives me the following warning. Heres the screenshot.
I understand that warnings can be ignored but should I be concerned about the above warnings?
-
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.
-
@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? -
@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!
-
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. -
@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
-
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.
-
@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?
-
@Stevendragoes said in Warnings.:
I have put the
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000into the .pro file and it still gives me the error.
I said remove it, not add is 😏
might have been se issue 🙈 -
@Stevendragoes said in Warnings.:
I have put the
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000into 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