Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt3D - Scene3D and 'persistent' root entity

Qt3D - Scene3D and 'persistent' root entity

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 283 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.
  • J Offline
    J Offline
    JanWillemsen
    wrote on last edited by
    #1

    Hi,

    I've got an application which can switch between a 3d view (Scene3D) and a 'normal' qt quick view (settings page with tables, input fields,...). The root entity in the Scene3D is a custom registered type (inherited from QEntity - RootEntity).
    Everytime I switch from the Scene3D page to another page, the Scene3D gets destructed and the aspectengine which has ownership over the root entity deletes my root entity. This sequence also deletes the meshes in the scene (because they are children of the root entiy). This means that every time i go back to my scene3d, i have to recreate the mesh data. What is the best way to avoid this? I could add another custom QEntity in between the root entity and my custom mesh entities as another 'layer' and detach it on destruction of the RootEntity. When a new Scene3D - RootEntity is instantiated i can then reattach this in between layer (I think), but it doesn't feel like an optimal solution...
    Anybody has other suggestions?
    Cheers,

    Jan

    1 Reply Last reply
    0
    • J Offline
      J Offline
      JanWillemsen
      wrote on last edited by
      #2

      I used the extra layer and disconnect it at destruction of the rootentity and reconnect it when a new rootentity is available. Seems to work ok...

      Jan

      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