You can try using QWidget::setPalette
window.setPalette(QBrush(Qt::NoBrush));

Hope this helps