I'm trying to create an OSX-like dock widget. Caveats are I'm working inside a QGraphicsView, with an OpenGL context as the viewport (see here), so I am mixing embedded Qt widgets in an OpenGL scene.

Not all widgets behave the same when embedded. For instance, the dock widgets don't seem to work (the dock area doesn't show up, I'm guessing this animation has only been coded for the native GUIs).

My question is I'm wondering what the best way to go about creating this OSX dock is?

Right now I'm using a QListWidget with the background made transparent by Qt::WA_NoSystemBackground. Unfortunately, I can't figure out a way to get the widget to automatically resize horizontally when I add items.

Also, there doesn't seem to be a good way to get the total size of all the contents of the QListWidget, so that I could resize it manually. I have searched the forum and found this but after implementing the suggestion in the last post the size returned is -1.

Anyone know how to automatically resize a QListWidget or know of another Qt widget I should be using to achieve my goal?