support korean path

This commit is contained in:
Yonghye Kwon 2021-11-26 00:11:49 +09:00
parent af8d5000ee
commit 09b7727941
2 changed files with 3 additions and 5 deletions

View File

@ -161,7 +161,7 @@ void label_img::showImage()
void label_img::loadLabelData(const QString& labelFilePath) void label_img::loadLabelData(const QString& labelFilePath)
{ {
ifstream inputFile(labelFilePath.toStdString()); ifstream inputFile(qPrintable(labelFilePath));
if(inputFile.is_open()) if(inputFile.is_open())
{ {

View File

@ -131,8 +131,7 @@ void MainWindow::save_label_data()const
if(m_imgList.size() == 0) return; if(m_imgList.size() == 0) return;
QString qstrOutputLabelData = get_labeling_data(m_imgList.at(m_imgIndex)); QString qstrOutputLabelData = get_labeling_data(m_imgList.at(m_imgIndex));
ofstream fileOutputLabelData(qPrintable(qstrOutputLabelData));
ofstream fileOutputLabelData(qstrOutputLabelData.toStdString());
if(fileOutputLabelData.is_open()) if(fileOutputLabelData.is_open())
{ {
@ -221,11 +220,10 @@ void MainWindow::prev_label()
void MainWindow::load_label_list_data(QString qstrLabelListFile) void MainWindow::load_label_list_data(QString qstrLabelListFile)
{ {
ifstream inputLabelListFile(qstrLabelListFile.toStdString()); ifstream inputLabelListFile(qPrintable(qstrLabelListFile));
if(inputLabelListFile.is_open()) if(inputLabelListFile.is_open())
{ {
for(int i = 0 ; i <= ui->tableWidget_label->rowCount(); i++) for(int i = 0 ; i <= ui->tableWidget_label->rowCount(); i++)
ui->tableWidget_label->removeRow(ui->tableWidget_label->currentRow()); ui->tableWidget_label->removeRow(ui->tableWidget_label->currentRow());