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

# previewPanel(_:previewItemAt:)

Returns the item that the preview panel should preview at a given index.

```
func previewPanel(_ panel: QLPreviewPanel!, previewItemAt index: Int) -> (any QLPreviewItem)!
```

## Parameters

`panel`

The preview panel.

`index`

The index of the item to preview.

## Return Value

The item that the preview panel should preview at index `index`.

## Discussion

---

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)