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. Siblings on top of QGLWidget
QtWS25 Last Chance

Siblings on top of QGLWidget

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 3.3k 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.
  • B Offline
    B Offline
    basil_fawlty
    wrote on last edited by
    #1

    According to the Qt documentation siblings on top of QGLWidget are not supported on mac.

    bq. On Mac OS X, when Qt is built with Cocoa support, a QGLWidget can't have any sibling widgets placed ontop of itself. This is due to limitations in the Cocoa API and is not supported by Apple. ("here":http://doc.qt.nokia.com/latest/qglwidget.html)

    As you can see in the quote it says: On Mac OS X, when Qt is built with Cocoa support...

    So, is there a possibility turning the Cocoa support off? I mean, from this sentence I understand, that it might be possible.

    It would be such a great help if I could place siblings on top of my QGLWidget...

    Thanks...

    1 Reply Last reply
    0
    • kkoehneK Offline
      kkoehneK Offline
      kkoehne
      Moderators
      wrote on last edited by
      #2

      Sure, you can compile Qt for carbon: configure -carbon ... . Note however that this is not as well supported any more (Tier 2 for 4.7), no 64 bit support ... See also http://doc.qt.nokia.com/4.7-snapshot/developing-on-mac.html

      Director R&D, The Qt Company

      1 Reply Last reply
      0
      • B Offline
        B Offline
        basil_fawlty
        wrote on last edited by
        #3

        Thanks for your answer. But I dont mean Qt in general. I mean especially creating siblings on top of a QGLWidget, which is a problem on mac.

        1 Reply Last reply
        0
        • kkoehneK Offline
          kkoehneK Offline
          kkoehne
          Moderators
          wrote on last edited by
          #4

          Your Qt is either using Cocoa, or Carbon. This isn't a runtime switch, but a compile switch, so I'm afraid you're out of luck.

          (Btw, I ran into the same problem a while ago, but could solve it by changing the widget hierarchy. Maybe you can make your sibling objects to be inside the QGLWidget scene)?

          Director R&D, The Qt Company

          1 Reply Last reply
          0
          • B Offline
            B Offline
            basil_fawlty
            wrote on last edited by
            #5

            bq. (Btw, I ran into the same problem a while ago, but could solve it by changing the widget hierarchy. Maybe you can make your sibling objects to be inside the QGLWidget scene)?

            This is interesting. Can you be more specific about that. How did you manage to do that? Maybe an example. I am new to Qt, so it is difficult to understand everything from descriptions.

            THANKS

            1 Reply Last reply
            0
            • kkoehneK Offline
              kkoehneK Offline
              kkoehne
              Moderators
              wrote on last edited by
              #6

              A QGLWidget can have child widgets, which are then automatically rendered in the OpenGL context. That is, if you've a hypothetical hierarchy:

              @MainWindow
              ToolBar1
              GLCanvas
              ToolBar2
              @
              And you want to allow the toolbars to overlay the canvas, you can try to change the hierarchy to

              @MainWindow
              GLCanvas
              ToolBar1
              ToolBar2@

              Director R&D, The Qt Company

              1 Reply Last reply
              0
              • A Offline
                A Offline
                andre
                wrote on last edited by
                #7

                They keyword in the warning is, I think, sibling widgets. That is: widgets that are at the same level of the GLWidget, instead of being child widgets of the GLWidget.

                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