Navigation
NavigationView Navigationsansicht
Ein adaptiver linker Bereich samt Inhaltsfläche für die Navigation auf oberster Ebene.
Beispiel
Die Eigenschaftsvorschau konnte nicht geladen werden. Wählen Sie „Eigenschaftsvorschau“, um es erneut zu versuchen.

Verwendung
Chrome-Slots
Kopf-, Haupt- und Fuß-Chrome sind Widgets im Besitz des Aufrufers; NavigationView weist ihnen lediglich die Shell-Geometrie zu.
#include <FluentQt/Navigation.h>
using namespace fluent::navigation;
auto* navView = new NavigationView(this);
navView->setMinimumWidth(440);
navView->setMaximumWidth(620);
navView->setFixedHeight(340);
navView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
navView->setDisplayMode(NavigationView::DisplayMode::Left);
navView->setExpandedPaneWidth(180);
navView->setHeaderChromeWidget(headerSection);
navView->setMainChromeWidget(mainSection);
navView->setFooterChromeWidget(footerSection);
populateNavigationPages(navView->contentHost());
auto routeToPage = [host = navView->contentHost()](int pageIndex) {
const int direction = pageIndex >= host->currentIndex() ? 1 : -1;
host->setCurrentIndex(pageIndex, direction, true);
};
headerSection->onActivated = routeToPage;
mainSection->onActivated = routeToPage;
footerSection->onActivated = routeToPage;import fluentqt
from PySide6.QtWidgets import QSizePolicy
nav = fluentqt.NavigationView()
nav.setMinimumWidth(440)
nav.setMaximumWidth(620)
nav.setFixedHeight(340)
nav.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed)
nav.setDisplayMode(fluentqt.NavigationView.DisplayMode.Left)
nav.setExpandedPaneWidth(180)
nav.setHeaderChromeWidget(header_section)
nav.setMainChromeWidget(main_section)
nav.setFooterChromeWidget(footer_section)
populate_navigation_pages(nav.contentHost())
def route_to_page(page_index):
host = nav.contentHost()
direction = 1 if page_index >= host.currentIndex() else -1
host.setCurrentIndex(page_index, direction, True)
header_section.on_activated = route_to_page
main_section.on_activated = route_to_page
footer_section.on_activated = route_to_pageAPI
DeklarationKeine passenden API-Elemente.