Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved QOpenGLWindow from QOpenGLWidget

    General and Desktop
    qopenglwindow qopenglwidget
    2
    3
    1538
    Loading More Posts
    • 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.
    • kshegunov
      kshegunov Moderators last edited by

      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 Reply Quote 0
      • Chris Kawa
        Chris Kawa Moderators last edited by

        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 Reply Quote 0
        • kshegunov
          kshegunov Moderators last edited by

          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 Reply Quote 0
          • First post
            Last post