Description
Displays a given set of images representing videos, folders or image files in a grid view.
API properties
- int spacing
- The border margin of the items.
- string defaultThumbnail
- The default image for the items.
- int frameBorderWidth
- Margin of the selection overlay.
- bool selectionMode
- On true the selected item is highlighted, on false only a pressed state is provided.
- int type
- The internal type. See the private properties for details.
Signals
- clicked
- Emitted when an item was clicked.
- Parameter:
- int mouseX, x position of the click event.
- int mouseY, y position of the click event.
- int payload, the clicked item.
- longPressAndHold
- Emitted when an item was long pressed.
- Parameters:
- int mouseX, x position of the click event.
- int mouseY, y position of the click event.
- variant payload, the clicked item.
- doubleClicked
- Emitted when an item was double clicked. Note that a 'clicked' for the first click is emitted as well.
- Parameters:
- int mouseX, x position of the click event.
- int mouseY, y position of the click event.
- variant payload, the clicked item.
- released
- Emitted when the left mouse button was released.
- Parameter:
- int mouseX, x position of the click event.
- int mouseY, y position of the click event.
- variant payload, the clicked item.
- positionChanged
- Emitted when the mouse moves above the item.
- Parameter:
- int mouseX, x position of the click event.
- int mouseY, y position of the click event.
- int payload, the hovered item.
Functions
- formatMinutes
- Provides functionality to calculate hours and minutes. Only for qml internal use.
- Parameter:
- int time, time/duration in seconds, for internal use only
Example
MediaGridView {
id: gridView
model: someModel
anchors.top: parent.top
anchors.bottom: parent.bottom
type: 2
width: 400
onClicked: {
// selected item and click position
}
}