Programming Keyboard Focus!
General and Desktop
2
Posts
2
Posters
1.8k
Views
1
Watching
-
I don't know if this is what you want, but I have a tabbed interface and an add button in my pages, I can press "Ctrl" + "+" and only the active tab respond
@add=new QAction(this);
connect(add, SIGNAL(triggered()), this, SLOT(slotAdd()));
add->setShortcut(QKeySequence(tr("Ctrl++")));
this->addAction(add);@Edit: I'm so sorry I misunderstand the question, you can set focus with
@setFocus()@
and a QTabWidget has a signal called @currentChanged@so you just have to acess a child of your new Widget and set the focus to it..