本文整理汇总了C++中QWizard::currentPage方法的典型用法代码示例。如果您正苦于以下问题:C++ QWizard::currentPage方法的具体用法?C++ QWizard::currentPage怎么用?C++ QWizard::currentPage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QWizard
的用法示例。
在下文中一共展示了QWizard::currentPage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: removeTabPage
void HierarchyList::removeTabPage()
{
QWidget *w = current();
if ( !w )
return;
if ( w->inherits( "QTabWidget" ) ) {
QTabWidget *tw = (QTabWidget*)w;
if ( tw->currentPage() ) {
QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw;
DeleteTabPageCommand *cmd = new DeleteTabPageCommand( i18n("Delete Page %1 of %2" ).
arg( dtw->pageTitle() ).arg( tw->name() ),
formWindow, tw, tw->currentPage() );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
}
} else if ( w->inherits( "QWizard" ) ) {
QWizard *wiz = (QWizard*)formWindow->mainContainer();
if ( wiz->currentPage() ) {
QDesignerWizard *dw = (QDesignerWizard*)wiz;
DeleteWizardPageCommand *cmd = new DeleteWizardPageCommand( i18n("Delete Page %1 of %2" ).
arg( dw->pageTitle() ).arg( wiz->name() ),
formWindow, wiz,
wiz->indexOf( wiz->currentPage() ), true );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
}
}
}
示例2: getExpandButton
QToolButton* WizardFiller::getExpandButton(HI::GUITestOpStatus &os){
QToolButton* expandButton = NULL;
QWidget* dialog = QApplication::activeModalWidget();
GT_CHECK_RESULT(dialog, "activeModalWidget is NULL",NULL);
QWizard* wizard = qobject_cast<QWizard*>(dialog);
GT_CHECK_RESULT(wizard, "activeModalWidget is not of wizard type",NULL);
QList<QWidget*> widList = wizard->currentPage()->findChildren<QWidget*>();
QList<QToolButton*> plusList;
foreach(QWidget* w, widList){
QToolButton* but = qobject_cast<QToolButton*>(w);
if (but && but->text()=="+" && abs(but->rect().width()-19)<2)
plusList.append(but);
}