---
title: "previewPanel(_:handle:)"
framework: quicklookui
role: symbol
role_heading: Instance Method
path: "quicklookui/qlpreviewpaneldelegate/previewpanel(_:handle:)"
---

# previewPanel(_:handle:)

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

## Declaration

```swift
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

Return Value true if the receiver handled the event; otherwise, false.

## Discussion

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

## See Also

### Optional Methods

- [previewPanel(_:sourceFrameOnScreenFor:)](quicklookui/qlpreviewpaneldelegate/previewpanel(_:sourceframeonscreenfor:).md)
- [previewPanel(_:transitionImageFor:contentRect:)](quicklookui/qlpreviewpaneldelegate/previewpanel(_:transitionimagefor:contentrect:).md)
