導覽
Pivot 樞紐導覽
以標題為基礎在同層級檢視間切換的導覽控制項,並帶有動態指示器。
範例
屬性預覽載入失敗。請再次點選屬性預覽重試。

用法
搭配承載頁面的 Pivot
連接 currentChanged 以在 StackContentHost 中切換頁面;停用的索引標籤仍會顯示,但無法選取。
#include <FluentQt/Navigation.h>
using namespace fluent::navigation;
auto* pivot = new Pivot(this);
pivot->addItem({"All", Typography::Icons::Mail});
pivot->addItem({"Unread", Typography::Icons::Filter});
pivot->addItem({"Flagged", Typography::Icons::Flag});
pivot->addItem({"Locked", Typography::Icons::Lock, false});
pivot->addItem({"Mentions", Typography::Icons::Contact});
auto* host = new StackContentHost(this);
for (int i = 0; i < pivot->itemCount(); ++i)
host->insertPage(i, createPage(pivot->itemAt(i).header));
connect(pivot, &Pivot::currentChanged,
host, [host](int index) { host->setCurrentIndex(index, 0, true); });import fluentqt
pivot = fluentqt.Pivot()
pivot.addItem(fluentqt.PivotItem("All", fluentqt.Typography.Icons.Mail))
pivot.addItem(fluentqt.PivotItem("Unread", fluentqt.Typography.Icons.Filter))
pivot.addItem(fluentqt.PivotItem("Flagged", fluentqt.Typography.Icons.Flag))
pivot.addItem(fluentqt.PivotItem("Locked", fluentqt.Typography.Icons.Lock, False))
pivot.addItem(fluentqt.PivotItem("Mentions", fluentqt.Typography.Icons.Contact))
host = fluentqt.StackContentHost()
for index in range(pivot.itemCount()):
host.insertOwnedPage(index, create_page(pivot.itemAt(index).header))
pivot.currentChanged.connect(lambda index: host.setCurrentIndex(index, 0, True))API
檢視宣告沒有符合的 API 成員。