API Documentation
Loading...
Searching...
No Matches
WidgetInit Class Reference

Provides a way to lazily initialize widgets when needed but still pass them to container dialogs. Useful for adding things to Settings dialogs or other large structures where they may never be initialized. More...

#include <WidgetInit.h>

Public Member Functions

virtual QWidget * getWidget ()
 
 WidgetInit (QWidget *widget)
 
 WidgetInit (std::function< QWidget *()> init)
 

Protected Attributes

const std::function< QWidget *()> m_create_widget
 
QWidget * m_widget = nullptr
 

Detailed Description

Provides a way to lazily initialize widgets when needed but still pass them to container dialogs. Useful for adding things to Settings dialogs or other large structures where they may never be initialized.


Constructor & Destructor Documentation

◆ WidgetInit() [1/2]

WidgetInit ( std::function< QWidget *()> init)
inline

◆ WidgetInit() [2/2]

WidgetInit ( QWidget * widget)
inline

Member Function Documentation

◆ getWidget()

virtual QWidget * getWidget ( )
inlinevirtual

Member Data Documentation

◆ m_create_widget

const std::function<QWidget*()> m_create_widget
protected

◆ m_widget

QWidget* m_widget = nullptr
protected

The documentation for this class was generated from the following file: