View Full Version : create play,pause and stop buttons
Sheetal
31st January 2007, 08:34
Hi
I want to create play, pause and stop buttons on QT form. I am using QT designer.
can anyone please tell me how can i do this?
wysota
31st January 2007, 08:42
Use QToolButtons.
Sheetal
31st January 2007, 09:13
i want to create play, pause and stop buttons as we get in Windows media player.
i will be creating separate buttons for play and pause.
i want their representation to match with those in Windows media player.
is it possible using QT?
aamer4yu
31st January 2007, 09:21
As wysota said, use QToolButton
and use the function void setIcon ( const QIcon & icon ) of QToolButton .
http://doc.trolltech.com/4.2/qabstractbutton.html#icon-prop
sunil.thaha
31st January 2007, 09:23
It is very much possible in Qt. From what I understood, you are looking for a button that can has a pixmap - the Normal one, and upon mouse hover you want to change it to a Hover pixmap. and then upon pressing the pressedPixmap. Moreover The pixmap can have transparency/mask and the masked portion has to be hidden. Is this your requirement ?
AFAIK, there is no widget that readily gives you this option. But you can subclass QButton to create a skinned button. I have seen one such in codeskipper.com. You can have a look at it
Sheetal
31st January 2007, 11:59
Thanks.....
how can i disable the Qtoolbutton?
If i click on the pixmap for play button then i need to show that the same play button is disabled. Do i need to replace the pixmap for that tool button or is there any other way??
wysota
31st January 2007, 14:23
how can i disable the Qtoolbutton?
By calling setDisabled(true) on it :)
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.