C++ (Qt)popoverForm->setPopover((__bridge void *)popover);QObject::connect(popoverForm, &PopoverForm::CloseButtonClicked, [popoverForm]{ NSPopover* parentalPopover = (__bridge NSPopover *)popoverForm->getPopover(); [parentalPopover close];});