PDA

View Full Version : Buttony issues :)



nupul
5th May 2006, 06:31
-I have put a pixmap on a button and have set it to be flat - setFlat(true);
The flat button seems "transparent" on the widget background, but when you press it it sinks in and the entire rectangular background is visible for the time duration of the click. I wish to disable this .i.e it should appear that only the button Icon has sunk in. How can I do this?

I tried setting the setAutoFillBackground(false) but it didn't help.

-when i see my application in Window Maker window manager, the buttons when selected get a frame drawn around them....can i do something about this?

-How do i set the default properties for all the buttons that i create in the class?

Thanks.

Nupul

zlatko
5th May 2006, 07:58
-I have put a pixmap on a button and have set it to be flat - setFlat(true);
The flat button seems "transparent" on the widget background, but when you press it it sinks in and the entire rectangular background is visible for the time duration of the click. I wish to disable this .i.e it should appear that only the button Icon has sunk in. How can I do this?




button->setMask(pixmap->createHeuristicMask());

nupul
5th May 2006, 19:44
Thanks zlatko....that's one down 2 to go...;)

nupul

zlatko
6th May 2006, 07:58
-How do i set the default properties for all the buttons that i create in the class?


Maiby its will be funny for you but I see one way - subclass QButton ans set for it all needed as default properties. Add then use this QYourButton classs instead QPushButton :)

nupul
6th May 2006, 18:11
Maiby its will be funny for you but I see one way - subclass QButton ans set for it all needed as default properties. Add then use this QYourButton classs instead QPushButton :)

No, i don't find it funny! It is a solution - a cute one indeed, but there must be someother way too...jacek/jpn/wysota/CBM could point out ;) . I could now say, 2 down....1 to go!! :D

Thanks zlatko

Nupul