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. Qt5 + QDockWidget + Widget OpenGL
Forum Updated to NodeBB v4.3 + New Features

Qt5 + QDockWidget + Widget OpenGL

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

    Hi, I work with an 3D Engine, I plug the 3D rendering inside a QWidget.
    The application contains two ToolBar (top and bottom) and many DockWidget.
    The 3D Widget is add to the QMainWindow.
    This part work perfectly with Qt 4.8.

    I try to use Qt 5.1, but unfortunately, I have some trouble, after create all the interface, the QDockWidget and QToolBar are not responding, except for the bottom toolbar. I try something, if i put all the toolbar at the bottom and put the QDockWidget to the right or floating, the widget works.

    I m working on OSX 10.8.4 with Qt 5.1

    Thanks

    Tony

    1 Reply Last reply
    0
    • D Offline
      D Offline
      ddennedy
      wrote on last edited by
      #2

      I too have had a lot of problems with QDockWidget on OS X while porting http://www.shotcut.org/ to Qt 5.1.1. I am using a QGLWidget in the center, but while troubleshooting, I believe I disabled that and still had problems. The top, left of the window becomes unresponsive to the mouse. Eventually, I found that things kind of worked if I do not hide the dockwidgets, especially upon launch. Also, I found floating a dockwidget makes the floating window blank! Even when I disabled floating and moving, I was able to trick the UI into letting me float the dock! I spent a lot of time turning off big chunks of code to narrow down the source of - what I was sure of is - my problem. But now I have given up, and I scrapped all of my dockwidgets (some forthcoming version). I ended up just using a couple of QSplitters to make a side- and bottom-bar UI design into which I have placed all of the dockwidget contents, each with a heading and close button. At least I know if I choose to move all of the UI to QML, then it will port easier as a sidebar design instead of dockwidget one. :o)

      1 Reply Last reply
      0
      • D Offline
        D Offline
        ddennedy
        wrote on last edited by
        #3

        I did some searching on the bug tracker, and I found a few tickets with quite a few duplicates of each around the same issues (and around using winId(), which is what my app was doing when not using the QGLWidget). A couple of them have "app->setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);" as a workaround - or partially so. I just reset my git branch back to where I still used QDockWidget, added that in my main.cpp before any UI is constructed, and it has made a huge improvement. Now, I need to do more testing to ensure it is stable, but according to the docs, you may be able to resolve some problems by applying Qt::WA_NativeWindow to some specific widgets where needed.

        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