---
title: currentPreviewItemIndex
framework: quicklookui
role: symbol
role_heading: Instance Property
path: quicklookui/qlpreviewpanel/currentpreviewitemindex
---

# currentPreviewItemIndex

The index of the current preview item.

## Declaration

```swift
var currentPreviewItemIndex: Int { get set }
```

## Discussion

Discussion The value is NSNotFound if there’s no current preview item.

## See Also

### Managing the Preview Items

- [dataSource](quicklookui/qlpreviewpanel/datasource.md)
- [reloadData()](quicklookui/qlpreviewpanel/reloaddata().md)
- [refreshCurrentPreviewItem()](quicklookui/qlpreviewpanel/refreshcurrentpreviewitem().md)
- [currentPreviewItem](quicklookui/qlpreviewpanel/currentpreviewitem.md)
- [displayState](quicklookui/qlpreviewpanel/displaystate.md)
