PDA

View Full Version : QPushButton mng files



qtnewbi3
12th July 2011, 02:46
Hi guys, first post here, I looked around and couldn't find the answer to my question:

I am trying to create an independent widget in Qt designer in which I need to have the function of a QPushbutton that can play/stop an .mng file embedded in it.

I know that only Qlabel can do that so I was wondering if there was any way to do this in Qt Designer.

I tried making the QPushButton transparent and just put a label with the movie in a label in the background but when I try to use a layout so it can autoexpand and fit as required the QPushButton and QLabel are separated.
I know this isnt the right way to do it but it was a try. Could you point me in the right direction as to how to do this using QPushButton

Santosh Reddy
12th July 2011, 03:51
QStackedLayout is a ideal candidate for your use, add QLabel and QPushButton to QStackedLayout and use
QStackedLayout::setStackingMode(QStackedLayout::St ackAll)

qtnewbi3
13th July 2011, 18:07
thank you santosh, i used something similar to this, i used stackedwidget in the qt designer ...