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. 115: error: 'class Qt3DCore::QAspectEngine' 'setData'
Forum Updated to NodeBB v4.3 + New Features

115: error: 'class Qt3DCore::QAspectEngine' 'setData'

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 1.0k Views 1 Watching
  • 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.
  • JinsuoJ Offline
    JinsuoJ Offline
    Jinsuo
    wrote on last edited by
    #1

    Hi guys,

    I am a new comer with Qt 5.7,and I have a problem with an error,maybe you can give me some suggestion.

    My error code as blow:

    View3D* view3D = new View3D;
    Qt3DCore::Quick::QQmlAspectEngine engine;
     engine.aspectEngine()->registerAspect( new Qt3DRender::QRenderAspect());
    engine.aspectEngine()->registerAspect( new Qt3DInput::QInputAspect());
    engine.aspectEngine()->registerAspect(new Qt3DLogic::QLogicAspect());
    
    
    QVariantMap data;
    data.insert( QStringLiteral( "surface" ), QVariant::fromValue( static_cast<QSurface*>( view3D ) ) );
    data.insert( QStringLiteral( "eventSource" ), QVariant::fromValue( view3D ) );
    
    engine.qmlEngine( )->rootContext( )->setContextProperty( "_settings", &m_settings );
    
     ***engine.aspectEngine()->setData(data);***
    
    engine.setSource( QUrl( "qrc:/qml/main.qml" ) );
    

    When we compile the project,that show the "engine.aspectEngine()_>setData(data) has an error,"115:28: error: 'class Qt3DCore::QAspectEngine' has no member named 'setData'".

    Thank you.

    Jin

    kshegunovK 1 Reply Last reply
    0
    • JinsuoJ Jinsuo

      Hi guys,

      I am a new comer with Qt 5.7,and I have a problem with an error,maybe you can give me some suggestion.

      My error code as blow:

      View3D* view3D = new View3D;
      Qt3DCore::Quick::QQmlAspectEngine engine;
       engine.aspectEngine()->registerAspect( new Qt3DRender::QRenderAspect());
      engine.aspectEngine()->registerAspect( new Qt3DInput::QInputAspect());
      engine.aspectEngine()->registerAspect(new Qt3DLogic::QLogicAspect());
      
      
      QVariantMap data;
      data.insert( QStringLiteral( "surface" ), QVariant::fromValue( static_cast<QSurface*>( view3D ) ) );
      data.insert( QStringLiteral( "eventSource" ), QVariant::fromValue( view3D ) );
      
      engine.qmlEngine( )->rootContext( )->setContextProperty( "_settings", &m_settings );
      
       ***engine.aspectEngine()->setData(data);***
      
      engine.setSource( QUrl( "qrc:/qml/main.qml" ) );
      

      When we compile the project,that show the "engine.aspectEngine()_>setData(data) has an error,"115:28: error: 'class Qt3DCore::QAspectEngine' has no member named 'setData'".

      Thank you.

      Jin

      kshegunovK Offline
      kshegunovK Offline
      kshegunov
      Moderators
      wrote on last edited by
      #2

      @Jinsuo said in 115: error: 'class Qt3DCore::QAspectEngine' 'setData':

      When we compile the project,that show the "engine.aspectEngine()_>setData(data) has an error,"115:28: error: 'class Qt3DCore::QAspectEngine' has no member named 'setData'".

      Yes, it doesn't have such a member.

      Read and abide by the Qt Code of Conduct

      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