PDA

View Full Version : problem with styleSheet for QDateEdit



DarthRamone
8th May 2012, 15:56
Hi everyone. Firstly, I want apologize for my bad english.
I'v got a problem with design for my QDateEdit.


QDateEdit {
border: 1px solid gray;
border-radius: 2px;
background: white;
selection-background-color: lightblue;
};

That's the current style, and it looks bad, because of ugly buttons for increment/decrement.
Now it looks like:
7704

I tried to correct buttons, set the border-style: none, background is none, either. Here is problem:
7705
Buttons are dissapeared. I don't know, what I have to do, I want to see only arrows, no borders, no backgrounds, no any mention of the buttons. In fact, there are no any buttons, as I want, but there are no arrows, either, and that's is problem.
Once again, I apologize for my english.

zgulser
8th May 2012, 20:50
You want buttons having only arrows right?

I think you are right about playing with buttons.

Keep setting border as none and set a background-image(prepare a png or jpg image with an arrow on it).

DarthRamone
8th May 2012, 21:11
You want buttons having only arrows right?
Yep

Keep setting border as none and set a background-image(prepare a png or jpg image with an arrow on it).
Oh... Wait a minute. As far as I understand your answer, the arrow on the button on QSpinBox, QDateEdit and so on, it's only background-image, not a symbol? It explains everything, in particular: it's explains why the buttons are disappeared when I'm trying to set transparent background. I thought that background will be transparent, and a arrow-symbol will be visible.
Thanks a lot! Tomorrow I'll try. I'm too tired to launch ide =) Thanks!

zgulser
8th May 2012, 21:18
They are all cosmetic stuff. Hope that works!