problem with custom stylesheet.css file

If you are having problems with QCAD, post here. Please report bugs through our Bug Tracker instead.

Always attach your original DXF or DWG file and mentions your QCAD version and the platform you are on.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
User avatar
petevick
Premier Member
Posts: 392
Joined: Tue May 19, 2020 9:34 am
Location: North Norfolk coast UK

problem with custom stylesheet.css file

Post by petevick » Sat Jan 09, 2021 5:30 pm

This might be one for Andrew.
I've been piecing together my own stylesheet.css file to better mimic my Linux theme. I'm pretty happy so far, but I've come up against a bit of a brick wall. In the QWidget section shown below I'm using qlineargradient for the main background, but it doesn't paint all the Tool Matrix headers as shown in the first attachment, however, if I just use a non gradient background (shown commented out) the headers do get painted as shown in the second attachment. I've searched for hours trying to find something that will paint the headers so I can use the gradient fill as I like the look more than just a flat colour, but to no avail.
Any help would be appreciated.

Bugger, I've got the attachment file names wrong way around :oops:

Code: Select all

QWidget
{
	background-color: qlineargradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0  rgba(102, 115, 140, 255),stop:1 rgba(56, 63, 77, 255));
/*	background-color: #566176; */
	color: #ffffff;
	border-color: #929fb3;
    selection-background-color: #308CC6;
/*	font-weight: bold; */
}
Attachments
nograd.png
nograd.png (32.67 KiB) Viewed 2782 times
grad.png
grad.png (32.78 KiB) Viewed 2782 times
Pete Vickerstaff
Linux Mint 21.2 Cinnamon, Qcad Pro 3.29.6

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: problem with custom stylesheet.css file

Post by andrew » Mon Jan 11, 2021 11:37 am

I'm afraid, I'll have to pass on that one.

As you might have noticed, the latest version of the dark QCAD theme uses a plugin instead of stylesheets. The plugin only adjusts the palette without applying styles. Styles tend to mess things up (apply one single style and the whole widget looks totally different as it is now rendered by Qt and not the operating system). I also don't think that everything can be adjusted using stylesheets.

Sorry I cannot be of more help. Perhaps someone in a Qt forum might know more.

User avatar
petevick
Premier Member
Posts: 392
Joined: Tue May 19, 2020 9:34 am
Location: North Norfolk coast UK

Re: problem with custom stylesheet.css file

Post by petevick » Mon Jan 11, 2021 11:56 am

andrew wrote:
Mon Jan 11, 2021 11:37 am
I'm afraid, I'll have to pass on that one.

As you might have noticed, the latest version of the dark QCAD theme uses a plugin instead of stylesheets. The plugin only adjusts the palette without applying styles. Styles tend to mess things up (apply one single style and the whole widget looks totally different as it is now rendered by Qt and not the operating system). I also don't think that everything can be adjusted using stylesheets.

Sorry I cannot be of more help. Perhaps someone in a Qt forum might know more.
Thanks for the reply Andrew.
Yes, I'm finding it gets a bit messy. I'm approaching it in a different way and I seem to be making more headway....at the moment.

If I get it to a point that I'm happy with, and that won't embarrass me :oops: I'll maybe post it up so others can tell me what I've missed :shock:

I think I'd be lost in the QT forums, waaaay above my pay grade !
Pete Vickerstaff
Linux Mint 21.2 Cinnamon, Qcad Pro 3.29.6

Post Reply

Return to “QCAD Troubleshooting and Problems”