avoid QskComboBox::openPopup crash, when not having a window yet

This commit is contained in:
Uwe Rathmann 2024-09-26 12:05:25 +02:00
parent 1fa98ef9a2
commit d52542c79b

View File

@ -114,6 +114,15 @@ void QskComboBox::setPopupOpen( bool on )
if ( on == isPopupOpen() )
return;
#if 1
if ( on && window() == nullptr )
{
// We need a delayed open call to avoid this problem.TODO ...
qWarning() << "QskComboBox can't be opened before being added to a scene.";
return;
}
#endif
setSkinStateFlag( PopupOpen, on );
if( on )