Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QQuickWidget inside QDockWidget: move not working
Forum Updated to NodeBB v4.3 + New Features

QQuickWidget inside QDockWidget: move not working

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 439 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    YTKOHOC
    wrote on last edited by
    #1

    Re: QQuickWidget inside QDockWidget: resize() not working

    In qt3d's example widgets-scene3d I added following code and add quickWidget as QDockWidget:

    ...
        QDockWidget * dockWidget = new QDockWidget;
        dockWidget->setWidget(quickWidget);
        mainWindow.addDockWidget ( Qt::RightDockWidgetArea, dockWidget );
    ...
    

    instead of adding to MDI area.
    And after trying to move it (make floating, then move to another DockWidget area) app totally crashes.
    I invented some crutch:

        dockWidget->setFloating(false);
        dockWidget->setFeatures(dockWidget->features() & QDockWidget::DockWidgetFeature::DockWidgetFloatable);
    

    And after that app not crashes but I can't move the Dock Widget with 3D scene.
    I may add screenshots of crashes (Windows, MinGW, MSVC 2017).

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dridk2
      wrote on last edited by
      #2

      I get similar issue from Python.
      It seems it works now using QQuickView instead .
      Try something like this :

      QQuickView * view = new QQuickView("yourfile.qml");
      QWidget * quickWidget = QWidget::createWindowContainer(view);
      mainWindow.addDockWidget ( Qt::RightDockWidgetArea, dockWidget );
      
      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved