Navigation
SelectorBar
A row of selectable items for switching between views.
Example

Usage
SelectorBar with hosted pages
currentChanged swaps the external page; selectionChanged exposes the selected item's data payload.
#include <FluentQt/Navigation.h>
using namespace fluent::navigation;
auto* selector = new SelectorBar(this);
selector->addItem(SelectorBarItem("Inbox", Typography::Icons::Mail,
true, true, "inbox"));
selector->addItem(SelectorBarItem("Calendar", Typography::Icons::Calendar,
true, true, "calendar"));
selector->addItem(SelectorBarItem("Settings", Typography::Icons::Settings,
true, true, "settings"));
auto* host = new StackContentHost(this);
for (int i = 0; i < selector->itemCount(); ++i)
host->insertPage(i, createPage(selector->itemAt(i).text));
connect(selector, &SelectorBar::currentChanged,
host, [host](int index) { host->setCurrentIndex(index, 0, true); });
connect(selector, &SelectorBar::selectionChanged,
this, [](int, const SelectorBarItem& item) {
const auto key = item.data.toString();
});import fluentqt
selector = fluentqt.SelectorBar()
selector.addItem(
fluentqt.SelectorBarItem(
"Inbox",
fluentqt.Typography.Icons.Mail,
True,
True,
"inbox"
)
)
selector.addItem(
fluentqt.SelectorBarItem(
"Calendar",
fluentqt.Typography.Icons.Calendar,
True,
True,
"calendar"
)
)
selector.addItem(
fluentqt.SelectorBarItem(
"Settings",
fluentqt.Typography.Icons.Settings,
True,
True,
"settings"
)
)
host = fluentqt.StackContentHost()
for index in range(selector.itemCount()):
host.insertOwnedPage(index, create_page(selector.itemAt(index).text))
selector.currentChanged.connect(lambda index: host.setCurrentIndex(index, 0, True))
selector.selectionChanged.connect(lambda _index, item: item.data)API
DeclarationNo matching API members.