本文整理汇总了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;
}
示例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();
}
}
示例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;
}