QCAD - 2D CAD System.

Click here for a documentation of the DokuWiki formatting syntax that can be used in reports

Please search for existing tasks (also closed ones) before opening a new task.

Please make sure that you are using the latest Version of QCAD before posting a bug (menu Help > Check for Updates)


FS#9 - RSettings.setValue() doesn't work for "GraphicsViewColors/BackgroundColor"

Attached to Project: QCAD
Opened by Anonymous Submitter - Thursday, 14 April 2011, 11:36 GMT+1
Last edited by Anonymous Submitter - Thursday, 14 April 2011, 15:53 GMT+1
Task Type Bug Report
Category QCAD (main)
Status Closed
Assigned To Andrew (andrew)
Operating System Linux (All / Other)
Severity Low
Priority Normal
Reported Version Development
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Context: Needed to set color settings for book images.

RSettings.setValue("GraphicsViewColors/BackgroundColor", new RColor(0xff, 0xfe, 0xfd));
RSettings.setValue("GraphicsViewColors/MetaGridColor", new RColor(0xff, 0xfe, 0xfd));


MetaGridColor  =@Variant(\0\0\0\x7f\0\0\0\aRColor\0\x1\xff\xff\xff\xff\xfe\xfe\xfd\xfd\0\0\0\x2)

Setting the alpha channel value and the color mode for RColor doesn’t change anything.
Using view.setBackgroundColor() instead works for the background color, but not for other colors such as the meta grid color.

This task depends upon

Closed by  Anonymous Submitter
Thursday, 14 April 2011, 15:53 GMT+1
Reason for closing:  Not a bug
Comment by Andrew (andrew) - Thursday, 14 April 2011, 12:20 GMT+1

The background color of a graphics view can be set without changing the configuration file (view.setBackgroundColor()). This override is needed for the part library icons (white background) and also serves as cache.

To set the background color for an existing graphics view (does not change the settings file):


To set the background color for all new graphics views (changes the settings file):

RSettings.setValue("GraphicsViewColors/BackgroundColor", ...);

To set the background color for an existing graphics view and changing the settings file, both lines are needed.

For all other colors, RSettings.setValue(...) can be used.

Comment by Anonymous Submitter - Thursday, 14 April 2011, 13:25 GMT+1

yes, but

RSettings.setValue("GraphicsViewColors/BackgroundColor", ...);

stores black (0) for any given value. That's the bug.

Sure I can make it with a workaround for the book images. The idea was to have a setup method, where all things are set right (colors, dock window settings etc.). At this point in time there is no drawing opened, so changing the config file was the only way.