92 QWizardPage *newPage = qobject_cast<QWizardPage *>(widget);
98 const auto idList = m_wizard->pageIds();
99 const auto pageCount = idList.size();
100 if (index >= pageCount) {
106 const int idBefore = idList.at(index);
107 const int newId = idBefore - 1;
108 const bool needsShuffle =
109 (index == 0 && newId < 0)
110 || (index > 0 && idList.at(index - 1) == newId);
113 WizardPageList pageList;
114 pageList.push_back(newPage);
115 for (qsizetype i = index; i < pageCount; ++i) {
116 pageList.push_back(m_wizard->page(idList.at(i)));
117 m_wizard->removePage(idList.at(i));
119 int newId = idBefore + delta;
120 for (QWizardPage *page : std::as_const(pageList)) {
121 m_wizard->setPage(newId, page);
126 m_wizard->setPage(newId, newPage);
156 QDesignerPropertySheet(object, parent),
157 m_pageIdIndex(createFakeProperty(QLatin1StringView(
pageIdProperty), QString()))
159 setAttribute(m_pageIdIndex,
true);
static const char * pageIdProperty
bool reset(int index) override