Navegación
SelectorBar Barra de selección
Fila de elementos seleccionables para alternar entre vistas.
Ejemplo
No se pudo cargar la vista previa de propiedades. Selecciona Vista previa de propiedades para reintentar.

Uso
SelectorBar con páginas alojadas
Añade elementos con addItem() y gestiona currentChanged o selectionChanged para cambiar de página o filtro.
#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
DeclaraciónNo hay miembros de la API que coincidan.