Qt: Transparent scrollbar - qt

I'd like to make a background of a scrollbar of QListView transparent. It should be painted over the content. Something like this. Is it possible?

Sure. Subclass it, override the paint event, and read this.

GUI style on screenshot is QML i think

I ended up with this hack. I just created a new vertical scroll bar, placed it onto viewport and connected it with the original scroll bar. Then I just hidden the original scrollbar :)
You can see the result: http://i.stack.imgur.com/wrQOQ.png

Related

Qlabel with image as the background overlaps other Qlabels

I have a Qlabel with image as rich text and some other Qlabels on top of that as in the picture:
although I sent the Qlabel with image to back but when I run they appear as follows:
is there anyway to fix this?
Make the text labels children of the label containing the fade. Also I can not see any layouts. Did you use layouts? You could also put the fade on the widget by implementing its paintEvent(). All other widgets will be displayed on top of that.
Try right clicking the image label and clicking the send-to-back option. That might work. That should send the QLabel behind the other elements even though they appear as though they are already in front.

Flex: Panel container loses borderSkin (embedded swf) when scrollbars appear

I've been asking around and googling like crazy, but can't figure this one out.
I have a panel in a flex-AIR app with a borderSkin - an #Embed swf symbol. Everything looks good till the panel has enough children added to merit a scrollbar, at which point the borderSkin disappears, leaving only the default background color. Remove the children and the borderskin comes back. The swf symbol uses scale9 grids.
What am I doing wrong? Any ideas?
Thanks in advance, Jeremy
I did find the answer from a friend.
Apparently, the panel's background color disappears automatically when a custom borderskin is applied. However, when scrollbars are used, that background reappears - white being the default color - and fills the entire panel. Setting the panel's background alpha to 0 solves the problem.
I finaly cheated.
I put my panel in a box and turned to off the scroll policy of my panel.
Hope it could help.
Cdkey22

Removing the Scrollbar from Horizontal List

I've got an Horizontal List. It contains 6 XML Nodes at the moment. But what I'd like to do is remove the scrollbar so that an button can function to scroll through the nodes instead.
Has anyone achieved this, if so how did you go about it?
Thanks in advance
You can usually remove the scroll bar by setting the horizontalScrollPolicy or verticalScrollPolicy to off.
After that, I believe you can scroll the list by setting the verticalScrollPosition or horizontalScrollPosition

Flex 3 - Rounded bottom corners on a window?

I'm making a flex 3.5a/air2 application and I've made a popup window but I can't seem to get its bottom corners rounded. Setting cornerRadius seems to only affect the top corners.
There doesn't seem to be a roundedBottomCorners property like there is for panels, and adding a controlbar with a cornerRadius also has no effect.
I'm sure this is a very simple problem but would really appreciate any help as I can't find the answer on google or after searching on here!
If you can give up window header (and paint it yourself), try to make transparent window (with transparent background) and construct it from controls you need. I'm sure you can get window of any shape this way.
Ended up making the window transparent and setting showFlexChrome to false. Then using a container I was able to get rounded corners.
It didn't help my other problem which was trying to get a glow effect around the window and still being able to resize it.. for that I had to override the mouseDownHandler from the window class so I could modify the drag locations to the container canvas. What a pain!

Flex scrollbar styling issue

I'm trying to style vscrollbar and hscrollbar inside a Vbox.But there's always a white square thing at the right bottom cornor which can not be styled.
My CSS is:
ScrollBar{
downArrowUpSkin: Embed(source="assets/images/scrollbar/arrow_down.png");
downArrowOverSkin: Embed(source="assets/images/scrollbar/arrow_down.png");
downArrowDownSkin: Embed(source="assets/images/scrollbar/arrow_down.png");
upArrowUpSkin: Embed(source="assets/images/scrollbar/arrow_up.png");
upArrowOverSkin: Embed(source="assets/images/scrollbar/arrow_up.png");
upArrowDownSkin: Embed(source="assets/images/scrollbar/arrow_up.png");
thumbDownSkin: Embed(source="assets/images/scrollbar/thumb.png");
thumbUpSkin: Embed(source="assets/images/scrollbar/thumb.png");
thumbOverSkin: Embed(source="assets/images/scrollbar/thumb.png");
trackSkin:Embed(source="assets/images/scrollbar/track.png");
fillAlphas:0,0,0,0;}
Could anyone help me out?Much Thanks!
This is a weird one. The white box at the bottom right is actually a (raw) child of the container.
To get around this you need to subclass whatever container you want to add your styled scrollbars to and remove the child called "whitebox":
var whitebox:DisplayObject = rawChildren.getChildByName('whiteBox');
if (whitebox)
rawChildren.removeChild(whitebox);
IIRC you need to do the above in two places: an override of createChildren and an override of validateDisplayList. In both cases remember to call the super class method first!
That area isn't controlled by the scroll bar(s), it's part of the original container. Does the VBox have it's background colour set to black?

Resources