Qt Forum

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

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    A window, several components

    General and Desktop
    2
    2
    518
    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.
    • N
      ninio last edited by

      I would like to create a window where I can have a OpenGL or SDL rendering part, and it shares with other parts which are normal window, like a list of users or a console.

      Something like this:
      http://s11.postimg.org/drmg7ptub/gui.png

      Is it possible?.

      [Edit sierdzio: fixed link]

      1 Reply Last reply Reply Quote 0
      • W
        wrosecrans last edited by

        Certainly. Basically, you have one top level widget, which has a layout. Each of the "regions" is a widget that is added to the layout. For OpenGL rendering, you can use a QGLWidget and handle drawing isnide of it however you want. SDL would probably be a lot more difficult to integrate into a Qt app though. Depending on what exactly you want to do, it may be impossible. Basically, you need to have SDL draw directly onto a native winID, which may behave differently on different platforms, and you need to avoid using SDL for input handling...

        http://qt-project.org/doc/qt-5/layout.html
        http://qt-project.org/doc/qt-5/QGLWidget.html
        http://stackoverflow.com/questions/118659/how-do-i-use-qt-and-sdl-together
        http://qt-project.org/doc/qt-4.8/qwidget.html#winId

        1 Reply Last reply Reply Quote 0
        • First post
          Last post