Create a drawer in QWidget
-
Hi,
Your drawer is typically a widget that is not part of a layout. You position it manually within your main widget and then you should be able to expand it the way you want it.
-
Full size transparent widget.
However, what else should be shown on your application ?
-
Just thought of QRubberBand
-
Just thought of QRubberBand
@SGaist said in Create a drawer in QWidget:
Just thought of QRubberBand
thank you but im not sure how the QRubberBand can help me here
-
It allows for an easy to use translucent overlay.
-
It's a widget so yes.
-
Well, it is a widget, so you can do with it the same things a with a QWidget.
-
@SGaist oh ok, but tbh I can't see how it would be better, because mostly I need to do the same thing that I have to do in
QFrame
inQRubberBand
too...
for example if I want to do it with A QFrame the steps would be1- create a Frame but dont put it in any layout
2- manually set its position
3- handle resize event on it, so its resize with the guiwhat I think is good way for it is, creating a empty frame as a placeholder (why? see the concept in first post)
then use that to move and resize the layoutless widget, and done.
the only problem that I currently have is how to resize the layoutless widget with animation, I mean if I want to use the normal way (I mean creating aQPropertyAnimation
with Drawer as parent andminimumWidth
as propertyName) it will only work when I want to expand the drawer, not the other way...