| 
					
				 | 
			
			
				@@ -93,7 +93,7 @@ public: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   /// who is changing children's visibility. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   bool     ForcingVisibility; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   /// Sometimes the creation of the widget is not done inside setVisible, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  /// as we need to do special processing the first time the button is 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  /// as we need to do special processing the first time the groupBox is 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   /// setVisible, we track its created state with the variable 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   bool     IsStateCreated; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -163,11 +163,17 @@ void ctkCollapsibleGroupBoxPrivate::setChildVisibility(QWidget* childWidget) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     visible = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  childWidget->setVisible(visible); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  // Setting Qt::WA_WState_Visible to true during child construction can have 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  // undesirable side effects. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  if (childWidget->testAttribute(Qt::WA_WState_Created) || 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      !visible) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    childWidget->setVisible(visible); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   // setVisible() has set the ExplicitShowHide flag, restore it as we don't want 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   // to make it like it was an explicit visible set because we want 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  // to allow the children to be explicitly hidden by the user. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  // to allow any children to be explicitly hidden by the user. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   if ((!childWidget->property("visibilityToParent").isValid() || 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       childWidget->property("visibilityToParent").toBool())) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     { 
			 |