Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Styling a Line from Designer #17

Closed
MHendricks opened this issue Dec 19, 2014 · 2 comments
Closed

Styling a Line from Designer #17

MHendricks opened this issue Dec 19, 2014 · 2 comments

Comments

@MHendricks
Copy link
Contributor

QDarkStyleSheet is a really nice stylesheet. I ran into a unstyled "widget", the "Horizontal Line" and "Vertical Line" in Qt Designer. It is a QFrame with height 3, sunken shadow and line width equal to 1. You can see it if examine header generated by uic tool.

QFrame[isLine="true"] {
    background-color: #3A3939;
}

The only way I can think to style it is to add a bool QProperty and use a dynamic property selector in the stylesheet. This is not the best solution because you have to remember to add the property every time.

QFrame[height="3"], QFrame[width="3"] {
    background-color: #3A3939;
}

Now that I'm typing this issue up, I thought of a second way to handle it, by checking if the width or height is 3 on qframes.

I don't know if either of these should be included in QDarkStyleSheet, but its worth mentioning in case someone has a better idea.

@ColinDuquesnoy
Copy link
Owner

Interesting. I'll have to give it a try and see if works cross plaftorm. It that works well it will end up in the official version ;)

@ColinDuquesnoy
Copy link
Owner

I've tried your second suggestion and it works like a charm (on KDE). It will be included in the next release. Thanks for sharing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants