I need to overlap two qvideowidget in same lyout how can i do it plz could anyone help me in this
I need to overlap two qvideowidget in same lyout how can i do it plz could anyone help me in this
Implement your own layout that will do that. However that's (I mean overlapping widgets) probably not the proper approach to solve your real problem, whatever it might be.
i didnt get it.Can u explain it lil bit more''Implement your own layout that will do that.''
Use QStackedWidget class. The QStackedWidget is a "notebook" but without "bookmarks". Changing a page in QStackedWidget is made otherwise (using setCurrentIndex(), which is a slot, but like any other slot, which can be called directly).
Subclass QLayout and implement virtual functions that will position the widgets the way you want.
However, again, that will probably not solve your real problem which is the goal of overlapping widgets. Overlapping widgets is usually a bad idea and there are other ways to achieve similar results. Choosing the right approach depends on the task that needs to be solved.
http://www.catb.org/esr/faqs/smart-questions.html#goal
I want to show a video on let say on display1 after some time will hide the display1 and then display2 will show the remaining video.
So i need widget tobe overlap.
No, you don't. You can e.g. use QGraphicsView with two QGraphicsVideoItem instances and fade (or whatever you want) those. Even if you choose to go with widgets, you don't need any layout for overlapping them, just place them in a common parent and make sure their geometry covers the geometry of the parent.
Thanks wysota.
Actually i am new to Qt and C++ so can you plz give me one short exmaple of this parent and child concept.
This is the most basic thing about Qt. See docs on Object Trees & Ownership
ok thanks
and How can i hide or fade one widget and show other.
So if i use hide and show the problem is it takes a few mili seconds to hide and show other and therefore there is a gap very small but it exist i dont want that gap how can i remove gap
Bookmarks