Skip to content

NotificationCenter

In-app notification drawer with grouping (2.27 / 2.63 / 2.70).

import QWinUI3.Extras · src/extras/QWinUI3/Extras/NotificationCenter.qml

Category: Status & feedback · Library: v2.80

← Component index

Gallery: Notification centersrc/gallery/pages/NotificationCenterPage.qml

Extends Control.

Example

NotificationCenter {
    id: center
    model: notifications
    maxHistory: 100
    persistCategory: "MyAppNotify"
    groupingPolicy: "category"  // category | severity | none
    onNotificationClicked: (index, item) => {  }
}
center.addNotification({
    id: "build-42",
    title: qsTr("Build finished"),
    message: qsTr("Release 2.63 succeeded."),
    category: qsTr("CI"),
    severity: center.success
})
center.open()

// --- API ---
// properties: model, groupRole, isOpen, unreadCount, maxHistory, dedupeIdRole
// methods: open(), close(), markRead(i), markAllRead(), clear(), clearRead(),
//          addNotification(item), push(item)
// signals: notificationClicked, notificationActionClicked, cleared

Notes

Experimental — dismissible history + category groups (FL-007). Complements ToastHost (transient) and InfoBarHost (inline). Pair with NotificationBridge recordInCenter (2.63). Not an OS notification center. See docs/notification-center-263.md.

API

Properties

Name Type Description
model var
groupRole string
dedupeIdRole string
maxHistory int
groupingPolicy string Grouping: "category" (default) | "severity" | "none" (2.70 D7)
persistCategory string Persist model + read flags under this Settings category (empty = memory only)
edge alias
drawerWidth alias
informational int
success int
warning int
error int
isOpen bool
unreadCount int
groupedModel var

Signals

Signature Description
notificationClicked(int index, var item)
notificationActionClicked(int index, var item)
cleared()

Methods

Signature Description
open()
close()
markRead(index)
markAllRead()
clear()
clearRead()
addNotification(item)
savePersisted()
loadPersisted()
push(item)

Inherited from Control

Also available (base type / Qt Quick Controls):

  • padding
  • font
  • background / contentItem

Generated from module sources by scripts/generate_component_docs.py — do not edit by hand.