tab widget

working prototype
This commit is contained in:
2026-02-14 14:32:07 +01:00
parent 819a08abc1
commit faac84821c
6 changed files with 62 additions and 1 deletions
+4 -1
View File
@@ -10,7 +10,8 @@ Test_Sim::Test_Sim(Communication *com, QObject *parent)
m_slider("Slider", Color::White, Color::Black, 0, 100, 0), m_dial("Dial", Color::White, Color::Black, 0, 100, 0),
m_thermo("Thermo", "%", Color::White, Color::Black, 0, 100, 0), m_led("Led", Color::White, Color::Red),
m_table(4, 4, {"Row 1", "Row 2", "Row 3", "Row 4"}, {"Column 1", "Column 2", "Column 3", "Column 4"}),
m_spinbox(0, 255, 0), m_double_spinbox(0, 255, 0), m_hex_spinbox(0, 255, 0)
m_spinbox(0, 255, 0), m_double_spinbox(0, 255, 0), m_hex_spinbox(0, 255, 0),
m_tab_widget({"Tab 1", "Tab 2", "Tab 3"}, 0, this)
{
m_thermo.set_start_color(Color::Red);
m_thermo.set_end_color(Color::Red);
@@ -32,6 +33,7 @@ Test_Sim::Test_Sim(Communication *com, QObject *parent)
PUSH_UI_ITEM(m_spinbox);
PUSH_UI_ITEM(m_double_spinbox);
PUSH_UI_ITEM(m_hex_spinbox);
PUSH_UI_ITEM(m_tab_widget);
for (size_t i = 0; i < m_table.capacity(); i++)
{
@@ -51,6 +53,7 @@ void Test_Sim::timer()
m_slider.set_value(0);
}
m_slider.set_value(m_slider.value() + 1);
m_tab_widget.advance_tab();
}
void Test_Sim::run_at_startup()