mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 00:00:04 +00:00 
			
		
		
		
	Add default layout to collapsible group
This commit is contained in:
		
							parent
							
								
									106542e28a
								
							
						
					
					
						commit
						396f64f0d4
					
				
					 3 changed files with 9 additions and 2 deletions
				
			
		|  | @ -56,6 +56,11 @@ void CollapsibleGroupImpl::Initialize() | ||||||
|    self_->Expand(); |    self_->Expand(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | QLayout* CollapsibleGroup::GetContentsLayout() | ||||||
|  | { | ||||||
|  |    return ui->contentsFrame->layout(); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| void CollapsibleGroup::SetContentsLayout(QLayout* layout) | void CollapsibleGroup::SetContentsLayout(QLayout* layout) | ||||||
| { | { | ||||||
|    ui->contentsFrame->setLayout(layout); |    ui->contentsFrame->setLayout(layout); | ||||||
|  |  | ||||||
|  | @ -25,8 +25,9 @@ public: | ||||||
|    explicit CollapsibleGroup(const QString& title, QWidget* parent = nullptr); |    explicit CollapsibleGroup(const QString& title, QWidget* parent = nullptr); | ||||||
|    ~CollapsibleGroup(); |    ~CollapsibleGroup(); | ||||||
| 
 | 
 | ||||||
|    void SetContentsLayout(QLayout* contents); |    QLayout* GetContentsLayout(); | ||||||
|    void SetTitle(const QString& title); |    void     SetContentsLayout(QLayout* contents); | ||||||
|  |    void     SetTitle(const QString& title); | ||||||
| 
 | 
 | ||||||
| public slots: | public slots: | ||||||
|    void Collapse(); |    void Collapse(); | ||||||
|  |  | ||||||
|  | @ -79,6 +79,7 @@ | ||||||
|      <property name="frameShadow"> |      <property name="frameShadow"> | ||||||
|       <enum>QFrame::Sunken</enum> |       <enum>QFrame::Sunken</enum> | ||||||
|      </property> |      </property> | ||||||
|  |      <layout class="QVBoxLayout" name="contentsLayout"/> | ||||||
|     </widget> |     </widget> | ||||||
|    </item> |    </item> | ||||||
|   </layout> |   </layout> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat