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. QOpenGLWindow from QOpenGLWidget

QOpenGLWindow from QOpenGLWidget

Scheduled Pinned Locked Moved Unsolved General and Desktop
qopenglwindowqopenglwidget
3 Posts 2 Posters 1.8k 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.
  • K Offline
    K Offline
    kshegunov
    Moderators
    wrote on 5 Dec 2015, 17:06 last edited by
    #1

    Hello,
    I need to acquire instance to a QOpenGLWindow from a corresponding widget I have. Is this possible and how can one go about it?

    Thanks in advance.

    Read and abide by the Qt Code of Conduct

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on 5 Dec 2015, 17:13 last edited by
      #2

      One does not inherit from the other so there's no way to do that.
      You could, for example, embed a window in a widget with createWindowContainer(), but they share similar functions. Why do you need to turn one into another?

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kshegunov
        Moderators
        wrote on 5 Dec 2015, 17:17 last edited by
        #3

        Hello,
        I know they don't inherit one another, that's why I'm asking if it's possible. :)
        I have a form with QOpenGLWidget laid out and want to use Qt3D, which does require a QWindow subclass for its painting routines. Now I was thinking maybe creating an attached QOpenGLWindow and sharing contexts but I'm not quite sure if this is the way. Anyway, createWindowsContainer is a possible solution, but I'd need to handle the layout insertion manually, this is why I'm asking.

        Kind regards.

        Read and abide by the Qt Code of Conduct

        1 Reply Last reply
        0

        2/3

        5 Dec 2015, 17:13

        • Login

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