For being hacker proof, its very important you dont store anything
clearly in the exe file.
That goes for the variables too.
When u read into memory, make sure its not easy to locate
and read. ( in mem)
so do not store passwords or user names as clean text inside program.
all must be encrypted.
That will only keep noob hackers out.
Anyone pro, will most likely be able to get access if
unlimited access to app and data.
You got a number of different possibilities suggested. Possibly you are overwhelmed by the different things. Sometimes it is hard for the people answering to know where the real problem was/is.
I am not sure now if this might be too detailed for you. Anyway I move forward.
I would suggest, if you have not done yet, The example from QFile as also listed by @jsulm and play a bit around. Just change the file name to somthing you need. E.g.
That is a possibility to specify a complete (absolute) file name.
If you are a beginner, I was in that stage before as all the others, there might be a problem with the not existing folder name, if your file not created. There is QDir::mkPath, which is slightly different from mkDir. It may help you in code to ensure that you actually can create the file.
The other thing driving me personally nuts is the stupid folder separator for windows, which is a back slash '\'. However, in the mean time you can easily substitute with a forward slash also for most things in Windows (especially Qt). This also part of some of the suggestions.
If you have difficulties sometimes it helps for others to post a short section of code and the error message.
I see that this is not as simple as I had hoped and I guess I will just deal with using a directory browse or letting the user set the name. The reason i have the user interacting with an .ini is because it is not just global program settings that are loaded. I want the user to have multiple configurations that they can easily switch between that have file paths and numeric settings saved so that the program can be used easily in rapid succession. The GUI is a port of a console application that is not yet finished so I want debugging with it to be quick. This is why I have the ability to save and load a .ini file so that if a user keeps testing with the same paths over and over they don't need to keep browsing for the same files over and over again. However, I wanted there to be the ability to have multiple setups saved which is why I don't just want there to be one .ini that is used automatically.
I know I could use some kind of slot system with the same .ini (like saves lots on a video game) to accomplish the same thing and the user just picks one of those slots. But like I said the application is not finished yet (the code behind the GUI) so it being perfectly clean is not an issue at the moment.
So you can say pixmap.save("/home/pw/myfile.jpg") and it will automatically detect the ".jpg" suffix. If you want to save the image without a suffix you must specify what file format you want to use: pixmap.save("/home/pw/myfile", "JPG") (see supported file formats).
This dependes on the format, which most likely adds some kind of compression. The compression result is depend on the ordering of the pixels, which may be entirely different when pixels are differently aligned after scaling. This has a direct impact on the size in bytes.
So, the conclusion is that there is some dependency (image contents, format, size) -> (size in bytes), but unless you aren't using an uncompressed format I wouldn't expect to be able to calculate the inversion of that function. This would be really complicated if even possible.
IMHO the problem is that QJsonValue QJsonValue::fromVariant(const QVariant & variant) (http://doc.qt.io/qt-5/qjsonvalue.html#fromVariant) can't convert BookMark to QJsonObject. I don't think that adding a custom converter with QMetatype::registerConverter() would help. Looks like you have to do the conversion to QJsonArray yourself.
Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.