直接上代码:
(配置文件 .ini需要放在debug或者release下)
头文件:
#ifndef CONFIG_H
#define CONFIG_H
#include <QSettings>
#include <memory>
#include <Qstring>
enum ImageType{
INFRARED,
VISIABLE,
UNDEFINED
};
class Config
{
public:
static Config& get(){
static Config config;
return config;
}
Config(const Config&)= delete ;
Config& operator=(const Config&)= delete ;
Config();
int getWidth() const;
int getHeight(