I have a widget (QlineEdits) thats is used to update a string member of my struct, the trigger is the editingFinished() signal from the QLineEdit.
from the snippet below
myclass::updateString(void) // connected to the editingFinished()
{
myStruct.name /* which is a QString*/ = myLineEdit->text();
}
myclass::saveToFile(void)
{
finalStruct = myStruct;
save(finalStruct); // found that my finalStruct has the old data of myStruct
}
myclass::updateString(void) // connected to the editingFinished()
{
myStruct.name /* which is a QString*/ = myLineEdit->text();
}
myclass::saveToFile(void)
{
finalStruct = myStruct;
save(finalStruct); // found that my finalStruct has the old data of myStruct
}
To copy to clipboard, switch view to plain text mode
I run in debugging mode and found that updateString was performed after saveToFile, that is when i type in line edit then pressed save . My hunch is that the updateString connection was qued or delayed somehow, Now my question is how can i make a connection givine a the highest priority?
baray98
Bookmarks