ナビゲーション
NavigationView ナビゲーションビュー
トップレベルナビゲーション用の適応型左ペインとコンテンツ領域を提供します。
サンプル
プロパティプレビューを読み込めませんでした。もう一度「プロパティプレビュー」を選択して再試行してください。

使い方
クロームスロット
ヘッダー、メイン、フッターのクロームは呼び出し側が所有するウィジェットで、NavigationView はシェルジオメトリの割り当てのみを行います。
#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
宣言を表示一致する API メンバーはありません。