How to set color for margin?
How I can setup color for margin?
In my class (that inherited from QScrollArea) I set up margin on the following manner:
setViewportMargins(0,3,0,0); //ONLY top margin
I want use it for show to user the "active" ScrollArea.
I know about the "border: " but it's not suitable.
There's no "margin-color" sort of property in CSS. Margin is just the space between the parent border and child border so it lies inside the parent but outside of the child. As such what you would call the color of margin is nothing else than a color of the parent widget.
So to have what you want just set the background-color of the QScrollArea to one color, and the background-color of the content widget to another.
Thanks, I tried to do that but it's look very ugly :-(
Sorry, can't see the image from this ftp address. Can you post it on something like imageshack?
I'm not sure I understand, but instead of giving the background one solid green color you can set a background-image like so:
background-position: left top;
dvillalobos last edited by
Hi Chris Kawa,
I just want to say thanks for the idea.