Improving Skills Qt
-
Hi
I am originally a game dev and Qt is the first non-for-game framework i learned. I want to further improve my skills. So i decided to write a program that is totally nonsense and serves no purpose but uses many Qt related features.
So i have learned many things but have some questions in mind. These are :
Note: Since this is for learning, do not consider this is hard or whatsoever, just tell me what to learn, do.- Which method to use for storing passwords and such?
- Which method to use for encryption?
- How to store safely inside an sql file. Sql related and Qt related safety measures?
- How to store and load translation related files? Also what method to use in case loading fails?(Hardcoding english translations maybe)
-
As far as I understand and know in general there is no anything specific for 1-3 in Qt.
So basically it is the same as with non Qt.Specific usage cases may be googled.
For example:
http://wiki.qt.io/Simple_encryption_with_SimpleCrypt- is explained well in documentation:
http://doc.qt.io/qt-5/internationalization.html
In short if there is no translation, String used in the code will be used.
You can even provide English translation if you want.For example I can write
QString s = tr("Kitty");
And provide translation file which would display "Doggy" instead of kitty. - is explained well in documentation:
-
Now i got another question. I tried using QNetworkConfigurationManager.
If connection situation changes program succesfully sends a signal. The signal is onlineStateChanged(bool)
If i use QNetworkConfigurationManager::isOnline() function inside a constructor. It fails. Maybe a bug?
Here is my code inside constructor :
networkConfigurationManager = new QNetworkConfigurationManager(this); // If there is network connection, close the program if(networkConfigurationManager->isOnline() == true) { this->close(); }