当前位置: 首页>>代码示例>>C++>>正文


C++ FormWindow::show方法代码示例

本文整理汇总了C++中FormWindow::show方法的典型用法代码示例。如果您正苦于以下问题:C++ FormWindow::show方法的具体用法?C++ FormWindow::show怎么用?C++ FormWindow::show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FormWindow的用法示例。


在下文中一共展示了FormWindow::show方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main

/*---------------------------------------------------------------------------
   Program entry point.
  ---------------------------------------------------------------------------*/
int cdeclare main(int argc, char** argv)
   {
   int Error = 0;

   Q_INIT_RESOURCE(kfx_resource);
   
   QApplication Application(argc, argv);

   try {
      Application.setApplicationName(NAMESPACE_PROJECT::AppName);
      Application.setApplicationVersion(NAMESPACE_PROJECT::AppVersion);
      Application.setOrganizationName(NAMESPACE_PROJECT::AppOrg);
      Application.setOrganizationDomain(NAMESPACE_PROJECT::AppAuthorWeb);

      MainCreateLogFile();
      MainSetAssetDir();

      if (!QGLFormat::hasOpenGL())
         {throw dexception("This system does not support OpenGL.");}

      if (!QGLFramebufferObject::hasOpenGLFramebufferObjects())
         {throw dexception("This system does not support OpenGL framebuffer objects.");}

      FormWindow Window;
      Window.show();

      Error = Application.exec();
      }

   catch (std::exception &e)
      {
      QMessageBox::information(nullptr, NAMESPACE_PROJECT::AppName, e.what());
      Error = MAIN_EXIT_ERROR;
      }

   catch (...)
      {
      QMessageBox::information(nullptr, NAMESPACE_PROJECT::AppName, "Trapped an unhandled exception.");
      Error = MAIN_EXIT_ERROR;
      }

   NAMESPACE_PROJECT::Debug::Close();

   return Error;
   }
开发者ID:DominikDeak,项目名称:KFX,代码行数:48,代码来源:main.cpp

示例2: designerCreated

void Project::designerCreated()
{
    for ( FormFile *ff = formfiles.first(); ff; ff = formfiles.next() ) {
	FormWindow *fw = ff->formWindow();
	if ( !fw || fw->mainWindow() )
	    continue;
	fw->setMainWindow( MainWindow::self );
	connect( fw, SIGNAL( undoRedoChanged( bool, bool, const QString &,
					      const QString & ) ),
		 MainWindow::self, SLOT( updateUndoRedo( bool, bool,
					 const QString &, const QString & ) ) );
	fw->reparent( MainWindow::self->qWorkspace(), QPoint( 0, 0 ), FALSE );
	QApplication::sendPostedEvents( MainWindow::self->qWorkspace(),
					QEvent::ChildInserted );
	fw->parentWidget()->setFixedSize( 1, 1 );
	fw->show();
    }
}
开发者ID:OS2World,项目名称:LIB-QT3_Toolkit_Vbox,代码行数:18,代码来源:project.cpp

示例3: addObject

void Project::addObject( QObject *o )
{
    bool wasModified = modified;
    objs.append( o );
    FormFile *ff = new FormFile( "", FALSE, this, "qt_fakewindow" );
    ff->setFileName( "__APPOBJ" + QString( o->name() ) + ".ui" );
    fakeFormFiles.insert( (void*)o, ff );
    MetaDataBase::addEntry( o );
    if ( hasGUI() ) {
	QWidget *parent = MainWindow::self ? MainWindow::self->qWorkspace() : 0;
	FormWindow *fw = new FormWindow( ff, MainWindow::self, parent, "qt_fakewindow" );
	fw->setProject( this );
	if ( QFile::exists( ff->absFileName() ) )
	    Resource::loadExtraSource( ff, ff->absFileName(),
				       MetaDataBase::languageInterface( language() ), FALSE );
	if ( MainWindow::self )
	    fw->setMainWindow( MainWindow::self );
	if ( MainWindow::self ) {
	    QApplication::sendPostedEvents( MainWindow::self->qWorkspace(), QEvent::ChildInserted );
	    connect( fw,
		     SIGNAL( undoRedoChanged( bool, bool, const QString &, const QString & ) ),
		     MainWindow::self,
		     SLOT( updateUndoRedo( bool, bool, const QString &, const QString & ) )
		);
	}
	if ( fw->parentWidget() ) {
	    fw->parentWidget()->setFixedSize( 1, 1 );
	    fw->show();
	}
    } else {
	if ( QFile::exists( ff->absFileName() ) )
	    Resource::loadExtraSource( ff, ff->absFileName(),
				       MetaDataBase::languageInterface( language() ), FALSE );
    }
    emit objectAdded( o );
    modified = wasModified;
}
开发者ID:OS2World,项目名称:LIB-QT3_Toolkit_Vbox,代码行数:37,代码来源:project.cpp


注:本文中的FormWindow::show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。