Hi, All
is it possible to set priority for the slots which connected to an object?
for example:
connect(myaction,SIGNAL(triggered()),this,SLOT(do_thing1()));
connect(myaction,SIGNAL(triggered()),view_,SLOT(do_thing2)));
myaction = new QAction(this);
connect(myaction,SIGNAL(triggered()),this,SLOT(do_thing1()));
connect(myaction,SIGNAL(triggered()),view_,SLOT(do_thing2)));
To copy to clipboard, switch view to plain text mode
I hope when the action is active , do_thing1 will be called first ,then call view_::do_thing2
but the problem is that I found view_::do_thing2 will be called first sometimes
this can solved by write another slot ,such as do_things:
void do_things()
{
do_thing1();
view_->do_thing2();
}
but I am still want to know if there is a way to control the calling sequence of the slots that connect to an object.
Thanks in advance,
Best regards,
hb
Bookmarks