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

Can't access qml Surface3DSeries or Surface3D from C++

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P3: Somewhat important
    • None
    • 5.13.0
    • Data Visualization
    • None
    • Linux/X11

    Description

      My main.qml declares a Surface3D with objectName “mySurface” and a Surface3DSeries item with objectName: “mySurfaceSeries”, something like this:

      Surface3D {
             objectName: "mySurface"
             width: parent.width
             height: parent.height
      
             Surface3DSeries {
                  objectName: "mySurfaceSeries"
      
                 ItemModelSurfaceDataProxy {
                   [...]
                 }
             }
         }
      

      After loading the qml in main.cpp, my C++ code calls rootObject->findChildren(). The returned object tree contains an object named “mySurface” but does NOT contain an object named “mySurfaceSeries”. There are no obvious errors in the qml, and the Surface3D is displayed properly with data provided by the Surface3DSeries.

      The object tree's “myService” object is not a Q3DSurface (through which I could access the series) but rather a QtDataVisualization::DeclarativeSurface which is not described anywhere that I can find. The DeclarativeSurface class is defined in qtdatavis3d/src/datavisualizationqml2/declarativesurface_p.h and contains a promising method seriesList() - but QtCreator code editor says “No type named ‘DeclarativeSurface’ in namespace ‘QtDataVisualization’”, apparently that file is not in QtCreator’s include-file path.

      Attachments

        1. main.cpp
          2 kB
        2. main.cpp
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            oulu_hillbilly Sami Varanka
            tom_asso tom_asso
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes