PDA

View Full Version : active child



evgenM
22nd May 2006, 12:59
i have QSplitter and 2 QTextEdit's in it
i need to know which TextEdit is current now (textEdit, where cursor is visible)

how i can do it?

munna
22nd May 2006, 13:03
use QWidget::hasFocus() to find which one is active.

wysota
22nd May 2006, 13:05
QApplication::activeWindow() is fine too, and you don't have to try each widget for focus this way :)

evgenM
22nd May 2006, 13:16
thanx all - now it work