<!--
{
  "availability" : [
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuickLookUI",
  "identifier" : "/documentation/QuickLookUI/QLPreviewPanelDelegate/previewPanel(_:handle:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Quick Look UI"
    ],
    "preciseIdentifier" : "c:objc(pl)QLPreviewPanelDelegate(im)previewPanel:handleEvent:"
  },
  "title" : "previewPanel(_:handle:)"
}
-->

# previewPanel(_:handle:)

Handles an event that the preview panel receives, but doesn’t handle.

```
optional func previewPanel(_ panel: QLPreviewPanel!, handle event: NSEvent!) -> Bool
```

## Parameters

`panel`

The preview panel.

`event`

The event that the preview panel wasn’t able to handle.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the receiver handled the event; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

The preview panel invokes this optional method when it receives an event it doesn’t handle.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)