mirror of
https://github.com/RGBCube/serenity
synced 2025-07-10 09:57:35 +00:00
LibGUI: Convert GProgressBar to ObjectPtr
This commit is contained in:
parent
3476a63415
commit
ceb5508fea
4 changed files with 7 additions and 5 deletions
|
@ -43,8 +43,8 @@ int main(int argc, char** argv)
|
|||
auto* button2 = new GButton("GButton 2", main_widget);
|
||||
button2->set_enabled(false);
|
||||
|
||||
auto* progress1 = new GProgressBar(main_widget);
|
||||
auto timer = CTimer::create(100, [progress1] {
|
||||
auto progress1 = GProgressBar::construct(main_widget);
|
||||
auto timer = CTimer::create(100, [&] {
|
||||
progress1->set_value(progress1->value() + 1);
|
||||
if (progress1->value() == progress1->max())
|
||||
progress1->set_value(progress1->min());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue