I'm showing QTableWidget, and want it to disappear after some item in this table was selected and if user clicked outside QTableWidget area.
connect(tableWidget, SIGNAL(itemClicked(QTableWidgetItem *)), tableWidget, SLOT(close()));
this line do what I want after selecting item. Is it a way of make widget disappears after clicking not on it without subclassing it (I can subclass and write my own losefocus event handler, for example, but without subclassing would be better)?
My solution was to put QTableWidget into QWidget and made the latter Qt::Popup - an it acts exactly how I need