QToolBox overlapped on top of window
I'd like to have a ToolBox on the side which doesn't resize the main work area. Like 'overlay' the contents underneath.
Adding it to a HBoxLayout:
And if I try parenting it to my QMdiArea, then it's a) transparent b) a fixed size that doesn't resize.
Strangely if I add a stylesheet, I at least get a background colour
Like if I add it to the right, then opening the toolbox will cause the main area to resize by cutting off a section of the right.
Maybe I want a resize policy for the left hand side? Namely: when resizing from the left, dont cut off from the right but cut off instead from the left? Something like that tongue twister I've written :p
I think one way to do this would be to use the QGraphicsView framework and by setting your toolbox to QGraphicsProxyWidget, with a higher z-value and expand it over the right area which again could contain other QGraphicsProxyWidgets ...
hey thanks. You're right, that would work :] But isn't QGraphicsView very slow? Especially since this covers the whole screen.
I've done some decent animations on QGraphicsView and got almost 25-30fps, so think its OK. Have you seen the Classic chips demo that ships with Qt?
"QSceneGraph":http://labs.qt.nokia.com/2010/05/18/a-qt-scenegraph/ promises a much better performing solution, but that may be for a future version of Qt?
yep I've seen it :) I'm actually using QGraphics extensively ("youtube video":http://www.youtube.com/watch?v=8tAASvcrJ78 "source code":http://github.com/genjix/)
So I'm a little apprehensive putting several QGraphicsView's inside another QGraphicsView while the whole thing is running off Python (pyside ;)
I will try it out though.
can one download ur poker game :)
yep, it's "free software":http://github.com/genjix/kartludox . I'm writing the server to be an IRC bot so people can easily host their own servers running games. And for real currency I'll setup one free service using "bitcoin":http://www.bitcoin.org/