MCPcopy Create free account
hub / github.com/Liniyous/ElaWidgetTools / setTabPosition

Method setTabPosition

ElaWidgetTools/ElaTabWidget.cpp:48–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46 const auto getIndex = [d, bar](int index) {
47 return index < 0 ? -1 : index + (bar == d->_tabBar ? d->_pinnedTabBar->count() : 0);
48 };
49 connect(bar, &QTabBar::currentChanged, this, [this, getIndex](int index) {
50 setCurrentIndex(getIndex(index));
51 });
52 connect(bar, &QTabBar::tabBarClicked, this, [this, getIndex](int index) {
53 setCurrentIndex(getIndex(index));
54 });
55 connect(bar, &QTabBar::tabMoved, this, [this, d, getIndex](int from, int to) {
56 d->_pages.move(getIndex(from), getIndex(to));
57 Q_EMIT tabMoved(getIndex(from), getIndex(to));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected