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. QML Canvas3D does not work with QQuickWidget or QQuickRenderControl
QtWS25 Last Chance

QML Canvas3D does not work with QQuickWidget or QQuickRenderControl

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qmlcanvas3dqquickwidgetqquickrenderconqoffscreensurfa
3 Posts 2 Posters 1.6k 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.
  • P Offline
    P Offline
    PhlipVR
    wrote on last edited by PhlipVR
    #1

    Hello, I've tried the examples http://doc.qt.io/qt-5/qtcanvas3d-textureandlight-example.html and https://doc.qt.io/qt-5/qtcanvas3d-quickitemtexture-example.html to understand Canvas3D in qml. However when I use the same code inside a QQuickWidget instead of a QQuickView there's a problem with the shaders : JS:Shader Compile failed so nothing is rendered besides the background color.
    What is the problem there?

    Edit: same problem happens when using QOffscreenSurface with QQuickRenderControl

    1 Reply Last reply
    0
    • ODБOïO Offline
      ODБOïO Offline
      ODБOï
      wrote on last edited by
      #2

      Hi,

      I don't know what is the probleme but maybe you can add a QQuickView inside your QQuickWidget so ^^

      QQuickView *_view = new QQuickView();
      QWidget *_wgContainer = QWidget::createWindowContainer(_view, this);

      LA

      1 Reply Last reply
      0
      • P Offline
        P Offline
        PhlipVR
        wrote on last edited by
        #3

        Thanks, I did try createWindowContainer and it works fine but I was expecting that QQuickWidget would work too given that it's recommended before createWindowContainer. Also it seems like the same problem happens when using QOffscreenSurface with QQuickRenderControl for the same qml with canvas3d.

        1 Reply Last reply
        0

        • Login

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