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. OpenGL under QML does not work with dynamic object creation
Forum Updated to NodeBB v4.3 + New Features

OpenGL under QML does not work with dynamic object creation

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 1 Posters 1.2k 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.
  • J Offline
    J Offline
    jsprenkle
    wrote on last edited by
    #1

    Good morning,

    I'm trying to get the OpenGL under QML example to work with dynamic object creation with no luck.

    The setup:

    I've partitioned the app window into a status bar and a display area. The display area will be used to render output from various Qt plugins. I've tried using the QML Loader object and Qt.createComponent() to dynamically load the objects from the plugins as needed.

    The problem:

    I've duplicated the opengl rendering with qml example. If I load it into the display area directly it works perfectly. If I load it into the display area using a Loader it displays nothing. I've logged debugging messages and it's definitely running. I've debugged the app using GDebugger and it appears to be sending OpenGL calls.

    Any ideas?

    I was careful to use the correct signal/slot property when connecting the rendering up;

    @connect( win, SIGNAL( beforeRendering() ), this, SLOT( paint() ), Qt::DirectConnection )
    @

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

      This issue turned out not to be the OpenGL control. In my QML I was loading the control as a child of a 'COLUMN' item. If you don't get the properties of the child controls correct the column will render the item but not display it. It may be rendering it out of the valid area and it's clipped off. I changed my QML to remove the column item and use anchors to place items in the positions I wanted.

      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