MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / moveControlsToSplitter

Function moveControlsToSplitter

lib/macro/macro-edit.cpp:27–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25namespace advss {
26
27static void moveControlsToSplitter(QSplitter *splitter, int idx,
28 QLayoutItem *item)
29{
30 static int splitterHandleWidth = 32;
31 auto handle = splitter->handle(idx);
32 auto layout = item->layout();
33 int leftMargin, rightMargin;
34 layout->getContentsMargins(&leftMargin, nullptr, &rightMargin, nullptr);
35 layout->setContentsMargins(leftMargin, 0, rightMargin, 0);
36 handle->setLayout(layout);
37 splitter->setHandleWidth(splitterHandleWidth);
38 splitter->setStyleSheet("QSplitter::handle {background: transparent;}");
39}
40
41static QToolBar *
42setupToolBar(const std::initializer_list<std::initializer_list<QWidget *>>

Callers 1

MacroEditMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected