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 );
|
||||
|
||||
@@ -27,9 +27,8 @@ class RiuWidgetStyleSheetManager;
|
||||
class QWidget;
|
||||
|
||||
//==================================================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
// ResInsight widget class. Meant to create and apply style sheets to particular widget instances.
|
||||
// without "bleeding" the look into other widgets.
|
||||
//==================================================================================================
|
||||
class RiuWidgetStyleSheet
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user