摘要:
widget *s =new widget;s->move((QApplication::desktop()->width()-s->width())/2,(QApplication::desktop()->height()-s->height())/2);s->show(); 阅读全文
posted @ 2014-05-04 10:14
Avatarx
阅读(483)
评论(0)
推荐(0)
摘要:
QTranslator* myTranslator=new QTranslator;myTranslator->load("xxx.qm");app.installTranslator(myTranslator);QTranslator* chTranslator=new QTranslator;c... 阅读全文
posted @ 2014-05-04 10:12
Avatarx
阅读(2842)
评论(0)
推荐(0)
摘要:
1. 以资源文件的形式设置控件样式QFiledata(QString(":/style.qss"));QStringqssFile;if(data.open(QFile::ReadOnly)){QTextStreamstyleIn(&data);qssFile=styleIn.readAll();d... 阅读全文
posted @ 2014-05-04 10:09
Avatarx
阅读(982)
评论(0)
推荐(0)
摘要:
QApplication::addLibraryPath(QApplication::applicationDirPath());QApplication::addLibraryPath(QApplication::applicationDirPath()+"/plugins/"); 阅读全文
posted @ 2014-05-04 10:07
Avatarx
阅读(663)
评论(0)
推荐(1)
摘要:
//QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));QTextCodec::setCodecForLocale(QTextCodec::codecForName("GBK")); 阅读全文
posted @ 2014-05-04 10:06
Avatarx
阅读(186)
评论(0)
推荐(0)
摘要:
voidinitDir(){QStringuserFilePath=QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation)+"/Mysoft";QDir*doc=newQDir;if(!doc->exists(userF... 阅读全文
posted @ 2014-05-04 09:57
Avatarx
阅读(1120)
评论(0)
推荐(0)
摘要:
QStringcmd;cmd.clear();QStringapplication_path=QCoreApplication::applicationFilePath();//带文件扩展名的全路径application_path.replace("/","\\");QStringregPath="... 阅读全文
posted @ 2014-05-04 09:48
Avatarx
阅读(1083)
评论(0)
推荐(0)
摘要:
1.http://qt.nokia.com的网站把QtSingleApplication 的源代码qtsingleapplication-2.6_1-opensource.zip 下载下来,然后解压缩。假 设解压缩到路径: E:\qtsingleapplication-2.6_1-opensourc... 阅读全文
posted @ 2014-05-04 09:43
Avatarx
阅读(349)
评论(0)
推荐(0)

浙公网安备 33010602011771号