hi all,
I want to execute my function "saveTraining()" 20 seconds after another function. I suppose a SingleShot-Timer to be the right choice.
If I call this command
QTimer::singleShot( 20000,
this,
SLOT(saveTraining
()));
QTimer::singleShot( 20000, this, SLOT(saveTraining()));
To copy to clipboard, switch view to plain text mode
my function "saveTraining()" is executed properly after 20 seconds. All works fine.
But if I try to commit an argument like in this command:
QTimer::singleShot( 20000,
this,
SLOT(saveTraining
(5)));
QTimer::singleShot( 20000, this, SLOT(saveTraining(5)));
To copy to clipboard, switch view to plain text mode
my function "saveTraining(int number)" isn't executed.
Infos:
-I also tried to commit other arguments, like QString or QPointF without success.
-The compiler is compiling this project without any errors or warnings
-There is the right prototyp of my function in the .h-File
-I also tried to commit a "Klassenvariable" without success. I don't know the right english word for "Klassenvariable". It's a variable which is declared staticly in the class so that every object of this class has this variable. Maybe "membervariable" is the right word for it.
-Version Qt 4.1.2 Open Source
Where is my mistake? Could it be possible that it isn't allowed to commit arguments in a SingleShot-Timer? I didn't see such an info in the documentation. I hope you can help me. Sorry for my probably bad english.
Hulk
Bookmarks