#include <QtGui/QApplication>
#include "lowresistance2.h"
#include <qtextcodec.h>
int main(int argc, char *argv[])
{
   QTextCodec::setCodecForCStrings(QTextCodec::codecForLocale());
    QApplication a(argc, argv);
     QDesktopWidget   *d   =   QApplication::desktop();   
     int   width   =   d->width();           //   returns   desktop   width   
     int   height   =   d->height();         //   returns   desktop   height  
    lowResistance2 w;
    w.setWindowTitle("多功能智能低电阻测试系统");
    w.setGeometry(0,0,width,height*24.755/27);
    w.show();
    a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
    return a.exec();
}
看我的例子