Hi,
I suppose we have a small misunderstanding.
We have this code:
myClass.h
....
private slots:
void mySlot(int);
...
....
private slots:
void mySlot(int);
...
To copy to clipboard, switch view to plain text mode
myClass.cpp
..
void MyClass::mySlot(int _value){
qDebug()<<_value;
}
....
..
void MyClass::mySlot(int _value){
qDebug()<<_value;
}
....
To copy to clipboard, switch view to plain text mode
..... and somewhere in the code.....
int x = 3;
QTimer::singleShot(2000,
this,
SLOT(mySlot
(x
)));
...
int x = 3;
QTimer::singleShot(2000,this,SLOT(mySlot(x)));
...
To copy to clipboard, switch view to plain text mode
What I am trying to explain is this:
In my app a QTimer::singleShot(...) do not work with slots taking arguments.
And I would like to ask:
Can a QTimer::singleShot() work with a slot taking arguments? yes, not? Why no?
Kacper
Bookmarks