P.S. At least while you're new, if you've got a function like http://doc.qt.io/qt-5/qdir.html#setCurrent which returns a result always check that! And use something like qDebug() << ... to check things as you go along, e.g.
The example names are just for explanation of how to integrate a third party library. The 3rd party library is integrated through relative path within your actual project. However, you may place the 3rd party stuff anywhere and your PC.
Basically you have to download and install the 3rd party library independent of Qt. You need to know the path to the includes and add this as relative or absolute path to INCLUDEPATH
You have to ensure that the libraries are compiled correctly for Qt installation (32 vs 64 bit, compiler andsome stuff). You need to locate the required libraries and setup absolute or relative path and libraries in LIBS
it is clear that * pA is a pointer to a new class A instance
what type of object is * pA ??
is an instance of the class but how do I declare it?
You already answered for yourself what type of object pA is --- it's a pointer to a class instance.
How to declare it? I gave you:
# Outside world goes:
classA *pA = new classA("Hello world");
but if I have set this variable in a program phase and then I will have to read it later in other classes and at other times of the process .. . how can I do? Do I have to carry the variable with me at every step?
Yes, like any other variable, if you need to access the object all over the place you have to pass it around. If it turns out(?) you often access the classA instance from your classB instance, you could create a classA * member variable in your classB and then if you're passing a classB instance around it will carry with it a classA * to save you having to pass that around separately.
I just I think of this like I do with function parameters, but I think of function parameters differently from local variables inside a function block (like const auto& list = ...;). Once I remember they're basically the same, it now makes sense.
With C++11, you can add the override keyword after the declaration of each function you re-implement. This will give the compiler a hint that will allow him to scream at you if you try to re-implement a non virtual function.
Last report from me:
It's working if i'll use simplest scan with for loop simply scanning every memory address from the beginning. To find variable address of my test program tooks about 24 seconds, considering that fact that that address was placed at the beginning(11 million position), and CPD with 4Ghc speed.
I calculated, using such "simple" scan might take 2 and half hours...
P.S. And CheatEngine doing such scan like in one second, but it was written on python, i dont know why he choose to write in that language, but must be some reason.
Thanks JonB, It seems that connClose() is the problem. Or more specifically the line 'mydb.removeDatabase(QSqlDatabase::defaultConnection);'. It seems that this only affects the server/client database (as I've tried it with PostresSql with the same results.)
I'm not sure why this doesn't affect Sqlite.
Even when you get this bit working, like I said I suspect your whole approach like now is not going to achieve what you want in the way of making these values available to every module, so you're going to have to do it a different way like I said anyway...
Good evening, I'm sorry for my absence.
It's true! The problem is a C ++ concept that I have been studying for a short time, together with QT. But those who use QT, if I understand correctly, also know C ++. For that I asked the question here. Apart from that, I think it's right that what you said also on the approach. I think that my intent must act in another way. the question is which one?
in your connect statement the first param is an object emitting a signal and the second one is a method (signal) of that object's class. Class QPushButton doesn't have a method (signal) named sayHello. It's a method (signal) in MainWindow class.
QPushButton has a method (signal) named clicked(), so you can connect that. If you want to call pushed() when the button "Hi" is clicked then you connect like this:
If you want the main window to emit sayHello when the button "Hi" is pressed and then in response to that you want to call replyHi you make two connections:
connect(ui->pushButton_2, &QPushButton::clicked, this, &MainWindow::sayHello); // emits sayHello when the button is clicked
connect(this, &MainWindow::sayHello, this, &MainWindow::replyHi); // calls replyHi when sayHello is emitted