-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Description
Examples\UI\HelloWorld\Sources\helloworld.cpp
Code:
// Create a popup window as hint on the label.
label->slots.connect(label->sig_pointer_enter(), [&](PointerEvent &e)
{
....
std::weak_ptr popup_weak = popup;
popup->slots.connect(label->sig_pointer_leave(), [&](PointerEvent &e)
{
auto p = popup_weak.lock(); // no longer exist
if (p)
p->dismiss();
});
window_manager->present_popup(label.get(), e.pos(label) + Pointf(10.0f, 10.0f), popup);
});
maybe the solution is:
....
static std::weak_ptr popup_weak = popup;
....
Metadata
Metadata
Assignees
Labels
No labels