Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
4.7.1
-
None
Description
This code cause infinity cycle. So when I'm pressing button winId is calling and cause QEvent::WinIdChange.
Inside Event handler winid is called again to obtain new winId and it cause one more QEvent::WinIdChange event and so on. What I'm doing wrong. Thank you.
void ProcessTab::OnButtonClick()
{
set(winId());
}
bool ProcessTab::event( QEvent* event )
{
if (event->type() == QEvent::WinIdChange)
return QWidget::event(event);
}
using QWidget::internalWinId inside the change event solves the problem but is not documented
There is a discussion on dev net for this topic: http://developer.qt.nokia.com/forums/viewthread/4377/