Style a \"popupMenuXY()\" object

Find and share HowTos to various installations / configurations!
3 posts • Page 1 of 1
vsolomonidou
Posts:23
Joined: Mon Mar 02, 2015 11:33 am

Style a \"popupMenuXY()\" object

Post by vsolomonidou »

Hi,

I've been trying to style a popupMenuXY object. From the function reference I can see that the font, foreground color and background color of the object can change.

Is it possible to change the outline color of the object and remove the blank area on the left of the menu? (I have attached a screenshot)

Also I've been using the "PUSH_BUTTON" and "SEPARATOR" keywords as parameters for the menu.

Is it possible to change the background color of the "PUSH_BUTTON" and the highlight color when it's being pressed? What about the "SEPARATOR" background color?

Thank you,

Vaso Image
Attachments
popupmenu_sample.png

fmulder
Posts:330
Joined: Wed Feb 03, 2010 9:46 am

Re: Style a \"popupMenuXY()\" object

Post by fmulder »

Look on the beautiful Internet and google for Qt and CSS stylesheets.

* Create a document config\\stylesheet.css
* Paste the code below in this file and restart your UI

QMenu
{
background-color: rgb(195, 210, 217);
border-color: white;
border-style: outset;
border-width: 2px;
color: black;
padding: 2px;
}

Share the fun
Frenk Mulder

p.s.
I can not answer your questions. Please play with the Qt styling. I'm sure that your layout is possible

vsolomonidou
Posts:23
Joined: Mon Mar 02, 2015 11:33 am

Re: Style a \"popupMenuXY()\" object

Post by vsolomonidou »

Great, thank you.

Vaso

3 posts • Page 1 of 1