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