本文整理汇总了C++中QFileDialog::saveGeometry方法的典型用法代码示例。如果您正苦于以下问题:C++ QFileDialog::saveGeometry方法的具体用法?C++ QFileDialog::saveGeometry怎么用?C++ QFileDialog::saveGeometry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QFileDialog
的用法示例。
在下文中一共展示了QFileDialog::saveGeometry方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: openFile
void FreeEMS_Loader::openFile() {
QSettings loaderSettings(settingsFile, QSettings::IniFormat);
loadDirectory = loaderSettings.value("lastDirectory").toString();
QFileDialog fileDialog;
fileDialog.setViewMode(QFileDialog::Detail);
fileDialog.restoreGeometry(loaderSettings.value("lastOpenDialogGeo").toByteArray());
QString qSNum;
loadFileName = fileDialog.getOpenFileName(this, tr("Load s19 file"), loadDirectory, tr("s19 (*.s19)"));
loaderSettings.setValue("lastOpenDialogGeo", fileDialog.saveGeometry());
if (loadFileName.isNull()) {
displayMessage(MESSAGE_ERROR, "no file selected");
return;
} else{
loaderSettings.setValue("lastDirectory", loadFileName);
loaderComms->setLoadFilename(loadFileName);
displayMessage(MESSAGE_INFO,"Attempting to parse " + loadFileName);
loaderComms->parseFile();
if(loaderComms->numLoadableRecords() == 0){
displayMessage(MESSAGE_ERROR, "no load-able records parsed");
}else if(loaderComms->numBadSums()){
displayMessage(MESSAGE_ERROR, "there are " + qSNum.setNum(loaderComms->numBadSums(), 10) + " records with bad checksums or lengths , loading will be disabled");
} else {
displayMessage(MESSAGE_INFO,"found " + qSNum.setNum(loaderComms->numLoadableRecords(), 10) +" load-able records in file");
ui.pushLoad->setEnabled(true);
m_fileLoaded = true;
}
}
}