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

QWidget WindowContainer breaks parent relation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P5: Not important
    • None
    • 5.1.0
    • None
    • Windows 7-64
      VS 2010 x86
      Qt 5.1.0

    Description

      Preconditions:
      You have a GUI made of QWidgets and a QWindow which will be integrated in your GUI with the createWindowContainer() method. This may be e.g. a QDockWidget *dockWidget and a QGLView *graphicsView which will be glued together with dockWidget->setWidget(createWindowContainer(graphicsView));
      This will lead to an object hierarchy in the form of
      dockWidget - someWidgetWindow - graphicsView.

      If I iterate upwards through the hierarchy starting from the QGLView as following:
      QObject *parentObject = graphicsView;
      while (parentObject)

      { pParentObject = pParentObject->parent(); }

      I would expect to come to the dockWidget, but this would not happen.

      The container class created by the createWindowContainer() call seems to be a QWidgetWindow which has a widget() method to work around this, but this class is completely private - so there's no opportunity to call this method, do a qobject_cast<QWindowWidget> etc.

      Attachments

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

        Activity

          People

            peppe Giuseppe D'Angelo
            ibdm Donald Marotzke
            Votes:
            2 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes