
Originally Posted by
anda_skoa
I am not sure I understand, the slot should only get called once per receiver object.
Do something like this in the slot
qDebug() << Q_FUNC_INFO << "this=" << this;
qDebug() << Q_FUNC_INFO << "this=" << this;
To copy to clipboard, switch view to plain text mode
and check if "this" is the same twice per emit.
Cheers,
_
I will try this but in the meantime look at the slot in Controls.cpp It contains a debug statement:
qDebug() << "ID Value = " << value;
qDebug() << "ID Value = " << value;
To copy to clipboard, switch view to plain text mode
For every instance the slot gets called the number of entries in the list. All the code for this small sample is posted. Maybe you can load it and run it to see what I mean. A UI which isn't posted will have to be created to have the three controls that is supposed to be in the custom widget.
Update:
The results of your suggestion is as follows:
ID Value = 268
void __thiscall Controls::WriteInfoNumber(int) this= Controls(0x389ef0, name = "Controls")
ID Value = 147
void __thiscall Controls::WriteInfoNumber(int) this= Controls(0x389ef0, name = "Controls")
ID Value = 147
void __thiscall Controls::WriteInfoNumber(int) this= Controls(0x389ef0, name = "Controls")
ID Value = 627
void __thiscall Controls::WriteInfoNumber(int) this= Controls(0x389ef0, name = "Controls")
ID Value = 627
void __thiscall Controls::WriteInfoNumber(int) this= Controls(0x389ef0, name = "Controls")
ID Value = 627
void __thiscall Controls::WriteInfoNumber(int) this= Controls(0x389ef0, name = "Controls")
ID Value = 268
void __thiscall Controls::WriteInfoNumber(int) this= Controls(0x389ef0, name = "Controls")
ID Value = 147
void __thiscall Controls::WriteInfoNumber(int) this= Controls(0x389ef0, name = "Controls")
ID Value = 147
void __thiscall Controls::WriteInfoNumber(int) this= Controls(0x389ef0, name = "Controls")
ID Value = 627
void __thiscall Controls::WriteInfoNumber(int) this= Controls(0x389ef0, name = "Controls")
ID Value = 627
void __thiscall Controls::WriteInfoNumber(int) this= Controls(0x389ef0, name = "Controls")
ID Value = 627
void __thiscall Controls::WriteInfoNumber(int) this= Controls(0x389ef0, name = "Controls")
To copy to clipboard, switch view to plain text mode
That's when calling on_actionFile_triggered() 3 times!
Bookmarks