<!--
{
  "availability" : [
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuickLookUI",
  "identifier" : "/documentation/QuickLookUI/QLPreviewPanelDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Quick Look UI"
    ],
    "preciseIdentifier" : "c:objc(pl)QLPreviewPanelDelegate"
  },
  "title" : "QLPreviewPanelDelegate"
}
-->

# QLPreviewPanelDelegate

A protocol for the delegate of the Quick Look preview panel.

```
protocol QLPreviewPanelDelegate : NSWindowDelegate
```

## Overview

You can implement these methods to perform custom tasks in response to events in the preview panel.

## Topics

### Optional Methods

[`func previewPanel(QLPreviewPanel!, handle: NSEvent!) -> Bool`](/documentation/QuickLookUI/QLPreviewPanelDelegate/previewPanel(_:handle:))

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

[`func previewPanel(QLPreviewPanel!, sourceFrameOnScreenFor: (any QLPreviewItem)!) -> NSRect`](/documentation/QuickLookUI/QLPreviewPanelDelegate/previewPanel(_:sourceFrameOnScreenFor:))

Returns the screen rectangle for a given preview item.

[`func previewPanel(QLPreviewPanel!, transitionImageFor: (any QLPreviewItem)!, contentRect: UnsafeMutablePointer<NSRect>!) -> Any!`](/documentation/QuickLookUI/QLPreviewPanelDelegate/previewPanel(_:transitionImageFor:contentRect:))

Returns the image to use for the transition zoom effect for a given item.

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSWindowDelegate`](/documentation/AppKit/NSWindowDelegate)

---

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)