You can't use CSS with custom widgets unless you are drawing them purely with the use of QStyle.