def prefBGcolor():
    askPreferences(['bgcolor'])
    draw.bgcolor(GD.config['bgcolor'])
def prefBGcolor():
    col = qt.QColorDialog.getColor(qt.QColor(GD.cfg.setdefault('bgcolor','')))
    if col.isValid():
        GD.prefsChanged = True
        GD.cfg['bgcolor'] = str(col.name()) # convert qstring to Python string!
        draw.bgcolor(col)
def setBGcolor():
    col = GD.cfg['draw/bgcolor']
    col = widgets.getColor(col)
    if col:
        GD.cfg['draw/bgcolor'] = col
        draw.bgcolor(col)
def prefBGcolor():
    col = qt.QColorDialog.getColor(qt.QColor(GD.cfg.setdefault('bgcolor','')))
    if col.isValid():
        GD.cfg['bgcolor'] = col.name()
        draw.bgcolor(col)