Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-18132

winId and WinIdChange problems

    XMLWordPrintable

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)

      { mId = winId(); return true; }

      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/

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            gerolf Gerolf Reinwardt
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes