mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add an assert on object name to RiuWidgetStyleSheet
This commit is contained in:
@@ -125,6 +125,8 @@ RiuWidgetStyleSheet::State& RiuWidgetStyleSheet::state( StateTag stateTag )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuWidgetStyleSheet::applyToWidget( QWidget* widget ) const
|
||||
{
|
||||
CAF_ASSERT( !widget->objectName().isEmpty() &&
|
||||
"The widget is required to have an object name set with setObjectName" );
|
||||
QString completeStyleSheet = fullText( QString( widget->metaObject()->className() ), widget->objectName() );
|
||||
// qDebug().noquote() << completeStyleSheet;
|
||||
widget->setStyleSheet( completeStyleSheet );
|
||||
|
||||
Reference in New Issue
Block a user