标题:
arm qt移植全程详解(10)
[打印本页]
作者:
yuyang911220
时间:
2014-8-30 13:04
标题:
arm qt移植全程详解(10)
void MyMainWidget::newFile()
{
statuslabel->setText(MyMainWidget::tr("File has been created!") );
statusBar()->clear();
statusBar()->message(MyMainWidget::tr("created") );
}
void MyMainWidget:
penFile()
{
statuslabel->setText(MyMainWidget::tr("File has been opened!") );
statusBar()->clear();
statusBar()->message(MyMainWidget::tr("Opened") );
}
void MyMainWidget::saveFile()
{
statuslabel->setText(MyMainWidget::tr("File has been saved!") );
statusBar()->clear();
statusBar()->message( MyMainWidget::tr("Saved") );
}
void MyMainWidget::exitMain()
{
QApplication::exit();
}
void MyMainWidget::copyFile()
{
statuslabel->setText(MyMainWidget::tr("File has been copyed!") );
statusBar()->clear();
statusBar()->message(MyMainWidget::tr("copyed") );
}
main.cpp
#include <qapplication.h>
#include "mainwidget.h"
int main(int argc, char **argv)
{
QApplication app(argc,argv);
app.setFont(QFont("unifont",16,50));
QTranslator translator( 0 );
translator.load(QString("hello_CN.qm"),".");
app.installTranslator( &translator);
MyMainWidget *mymainwidget = new MyMainWidget(0);
mymainwidget->setGeometry(10,30,280,200);
app.setMainWidget(mymainwidget);
mymainwidget->show();
return app.exec();
}
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/)
Powered by Discuz! 7.0.0