Change QScrollBar arrows By displaying a picture - qt

I'm trying to replace the default arrows of QScrollBar with custom arrows that I have as pictures. I tried something but it didn't work out as it's not displaying anything at all...
What I've tried:
QScrollBar::add-line:vertical {
image: url(:/DownArrow.png);
}

Related

Angular PrimeNG menubar: Hide default down arrows next to menu titles

The default PrimeNG menubar includes a little down arrow next to every main menu title. I want to remove the down arrows completely from the top-level menu title. Nested sub-menus may display a right arrow to show there is a sub-menu, and those can stay. Here are some screenshots with default menubar:
https://www.primefaces.org/primeng/showcase/#/menubar
I can change the icons in the menu items easily, but can't find a handle to change/hide the arrows.
I'm using Angular CLI 9.1.8 and PrimeNG 9.1.0.
to hide it in style.css change its content like
.pi-caret-down::before{
content: "";
}
check in developer console inspect element font name then make its before css as content: "";
Using display:none has the added benefit of resizing the menuitem container to adjust for the removed arrow icon. Otherwise, you will be left with a blank space.
.pi-caret-down {
display:none;
}

How to create a button beside header text in QTreeView?

I need to create a button beside header text like this for sorting.
The requirements are:
the button and the header text should be in a group to be aligned together
when I click on the button up_arrow, the list will be sorted (in the picture it is not sorted :D), and the icon changes into down_arrow for sorting in the opposite order.
How can I do this?
If you're happy with the default indicator's look and behaviour the following code should be sufficient:
//Set up QTreeView, add model etc...
tree_view->setSortingEnabled(true);
QHeaderView* header = tree_view->header();
header->setSortIndicatorShown(true);
If you would like to customise the behaviour of the sorting, have a look at QSortFilterProxyModel.
To style the indicators you could perhaps use Qt's Style Sheet:
QHeaderView::down-arrow {
image: url(down_arrow.png);
}
QHeaderView::up-arrow {
image: url(up_arrow.png);
}

Unable to style a cell tooltip of ngGrid

I am trying to add a tooltip to my cells. Using the title attribute works, but the style is different from the rest of the page (bootstrap styling) http://i.stack.imgur.com/PQMmj.png
Changing the title attribute to tooltip doesn't work - it looks like it hides the tooltip under the next cell (changing the coordination of the tooltip to something within the range of the cell, made it partially visible).
(I am new so I cant post images, https://github.com/angular-ui/ng-grid/issues/800 )
Any idea whats wrong?
Thank you.

Extjs - Custom message box layout

I would like to create a custom message box layout to my application.
I want the header to hold the icon next to the window title.
I want the header to have a bottom border ( this can be achieved by CSS I think)
I want this layout to be on all of my message boxes.
Where do I determined the layout of the window ?
I have looked for the window TPL but could not find it...
To show the icon in the header next to the title, instead of using the icon configuration, use the iconCls configuration. While the icon config is overridden in Ext.window.MessageBox, iconCls is not.
The bottom border and the icon, you will define them in your own css file. I'm not sure if you can limit the bottom border only to messageboxes, and not have the in other windows.
An example css can look like this:
.x-window-header .x-box-inner {
border-bottom: 1px solid #333;
}
.msg-question {
background-image: url('questionmark-icon.png');
}
Your message box would be like:
Ext.Msg.show({
title:'Save Changes?',
msg: 'Would you like to save your changes?',
buttons: Ext.Msg.YESNOCANCEL,
iconCls: 'msg-question'
});

How to prevent Kendo UI Pie Chart Tooltip from drawing outside parent Div?

I'm using Telerik's Kendo UI pie chart. I'm using the following configuration for the Tooltip:
tooltip: {
visible: true,
template: "${ category } - ${ value }%"
},
My category names are getting cut off because the Tooltip labels are too large. Is there a way to alter the location of where the Tooltip is displayed?
I'm not sure about moving the tooltip as you would have to do it for all of them and it might not look great. What about wrapping your text in the tooltip? You can do that by specifying normal white-space in your template. The parent of the tooltip template forces it into one line so you have to override that.
Checkout this fiddle here and see if this gets you closer to something that works for you.
http://jsfiddle.net/burkeholland/JZrAt/
Alternatively, if you don't want the word wrap suggested in Burke's answer
.k-tooltip { width: auto } worked for me.
can you try playing around with the overlay or does the tooltip have an overlay property
overlay: {
gradient: "none"
}

Resources