59 VectorEditorSignals( parent ), m_vector( vector ) {
61 QVBoxLayout* layout =
new QVBoxLayout;
63 layout->setContentsMargins( 0, 0, 0, 0 );
64 layout->setSpacing( 0 );
65 for (
auto& elem : m_vector ) {
66 auto spinbox =
new WidgetType(
this );
69 spinbox->setValue( elem );
70 if constexpr ( std::is_floating_point_v<T> ) { spinbox->setDecimals( 3 ); }
71 layout->addWidget( spinbox );
72 auto updateVectorOnChange = [
this, &elem]( SignalType value ) {
74 emit valueChanged( m_vector );
77 spinbox, QOverload<SignalType>::of( &WidgetType::valueChanged ), updateVectorOnChange );