How to give back groundcolor to widget? - qt

i my qt application i have a window and i set the background color of the window as white using "Change stylesheet'when i placed a button its background color is also the white.....i want the green window with button with a background color of grey...how to achieve this?

You need to set the autoFillBackground property to true on the widget.
Otherwise the background color, you have selected, will have no effect.
If this is not the case, please write a better description of the problem.

Related

Label Focus Color Change in s:label

I want to change the text color of the S:Label control on rollover by changing the style i want to change the text color to different. can any one please help me. For example i mouse over on Label the text of the color should change to green but not background color.
In actionscript add a mouse over listener and mouse out listener to the label. In the function for mouse over just put in:
label.setStyle("color","#00FF00");
and on the mouse out revert it back to #000000 for black.
Note: In actionscript color normally refers to text color and you get a seperate variable for the background normally used as backgroundColor.

JavaFX Changing Button Color

I have a button that I change to the color green using
button.setStyle();
Now I need to make it back to the default color. How would I do that?
You can clear the styles you have set with button.setStyle("");

Twitter Bootstrap's Element Border Color

I want to change the border color of any element when it gets focused from blue to green. The problem is I don't know the attribute name I should change to override this. Any help would be very much appreciated.
Below is an image for better comprehension:
Go to http://getbootstrap.com/customize/, look for #input-border-focus, enter your desired color code, scroll down and click "Compile and Download".

Change color of a Flex 4 spark Button

Is there an easy way to change the background color of a Flex 4 spark Button without messing with skins?
UPDATE: ok, figured it out, simply set the chromeColor attribute of the Button mxml.
For spark components, you can use chromeColor style:
<s:Button chromeColor="0xff0000" label="chrome red"/>
You can change the color style of the button. You can also have a bitmap fill.
Update: The above methods do not change the background.
Easiest way to change the background, you can use - opaqueBackground property.
Here is another way to change the background of a button without changing its skin -
1. Create a group with a rectangle and your button.
2. Set opaqueBackground of your button to null.
3. Make width and height of rectangle to 100%
4. whatever color you fill the rectangle with is the background of your button.
This can also be done via code like :-
btnID.addEventListener(MouseEvent.MOUSE_OVER, textChange);
btnID.addEventListener(MouseEvent.MOUSE_OUT, textChangeback);
private function textChange(event:MouseEvent):void
{
btnLinkDelete.setStyle("color", 0xFFFFFF)
btnLinkDelete.setStyle("chromeColor", 0x535151)
}
private function textChangeback(event:MouseEvent):void
{
btnLinkDelete.setStyle("color", 0x000000)
btnLinkDelete.setStyle("chromeColor", 0xfcffff)
}
I am posting it, if anyone want to change background color on mouse hover.

Removing default onclick or onItemClick color animation

When I click on some button or I click on the a element in grid or list view, a default orange color appears. I don't want that color to come when I click on it. Please tell me how can I do this.
And also is it possible to change the orange color by some other custom color when i click on button or items in grid or list view.
There is an example of how to set this here:
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/1c9e319c-79aa-4608-a302-0a6c9d93d504

Resources