Hello, I have an app where user can change a variables - delays, hotkeys etc. I do the "config saver" but it recieve "old" (not updated) variables. "Variable check" in same class working, but in other class shows others.
void Building
::setWindowName(QString value
){ connect(this,
SIGNAL (textChanged
(QString)),
this,
SLOT(setWindowName
(QString)));
sett.windowName = value;
sett.windowID = (const wchar_t*) sett.windowName.utf16();
qDebug() << "windowName " << sett.windowName; //Shows updated
}
void Building::setWindowName(QString value){
connect(this, SIGNAL (textChanged(QString)), this, SLOT(setWindowName(QString)));
sett.windowName = value;
sett.windowID = (const wchar_t*) sett.windowName.utf16();
qDebug() << "windowName " << sett.windowName; //Shows updated
}
To copy to clipboard, switch view to plain text mode
{
Q_OBJECT
public:
explicit Settings
(QObject *parent
= nullptr
);
int toggleButton=0x52;
int btoggleButton=0x52;// r
int inventoryKey=0x45; // e
int minCpsDelay = 10;
int maxCpsDelay = 15;
QString windowName
= "Minecraft 1.8.8 (Blazingpack.pl)";
LPCWSTR windowID = (const wchar_t*) windowName.utf16();
class Settings : public QObject
{
Q_OBJECT
public:
explicit Settings(QObject *parent = nullptr);
QSettings* sett;
int toggleButton=0x52;
int btoggleButton=0x52;// r
int inventoryKey=0x45; // e
int minCpsDelay = 10;
int maxCpsDelay = 15;
QString windowName = "Minecraft 1.8.8 (Blazingpack.pl)";
LPCWSTR windowID = (const wchar_t*) windowName.utf16();
To copy to clipboard, switch view to plain text mode
void Settings::clickcheck()
{
qDebug() << windowName; //Showed old - not updated variable.
}
void Settings::clickcheck()
{
qDebug() << windowName; //Showed old - not updated variable.
}
To copy to clipboard, switch view to plain text mode
I just want to save some data from different classes.
Bookmarks