hi,
I need to apply frameShadow and framestyle to QLabel in a qss file.How to do that?
Plz help.
hi,
I need to apply frameShadow and framestyle to QLabel in a qss file.How to do that?
Plz help.
Cheers,
Phillip
--- Please post the solution you got to solve your problem. It may help others.
What seems to be the problem?
If you don't know how to apply your style sheet implemented in qss file you should do like this
Qt Code:
QString labelStyle; labelStyle = file.readAll(); file.close();To copy to clipboard, switch view to plain text mode
C++ & AMD forever
I'm applying the qss as above u've asked. my problem is that i need to apply frameshadow:Sunken to QLable .
How ll i apply thru qss file.
my code inside qss file is as follows.
QLabel
{
background-color: ash;
color: black;
font-family : MS Sans Serif;
font-size : 8px;
font-weight : normal;
}
Cheers,
Phillip
--- Please post the solution you got to solve your problem. It may help others.
Am not sure if this will help -
QLabel{ color: palette(shadow); }
also have a look at frameshadow topic
Looks like you're out of luck in the sense that, by default, according to the docs:
Have you tried using a border? Something like:Since 4.3, setting a stylesheet on a QLabel automatically sets the QFrame::frameStyle property to QFrame::StyledPanel.
Qt Code:
{ border: 1px inset gray; }To copy to clipboard, switch view to plain text mode
Or something similar?
Last edited by Shadowfiend; 25th April 2008 at 16:40. Reason: [code] does not, in fact, end with [/quote]
aahhhh,,, u posted before me :P
I played with the stylesheet example in the QtDemo and made the following changes in code -
Qt Code:
To copy to clipboard, switch view to plain text mode
and on running the application, i tried edit, and in the edit made the following change -
Qt Code:
/* Mark mandatory fields with a brownish color. */ .mandatory { color: brown; border-width:2; border-style: inset; }To copy to clipboard, switch view to plain text mode
finally something
by the way, Philip, ur questions will make everyone expert in using stylesheets![]()
It may sound rude but are you familiar with Qt style sheets and Qt itself ?
What I wrote means that you should literally write in your program code. For instance
I hope it helps
C++ & AMD forever
I am neither an expert, I too learn from such postings.
believe me, i didnt knew the answeri had to search, glad i learned something new too.
Bookmarks