Watching current dir for changes to reload file list

This commit is contained in:
2016-07-31 18:10:32 +02:00
parent c69c8eb7da
commit 3faba4eac9
4 changed files with 50 additions and 31 deletions
+2 -1
View File
@@ -20,6 +20,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent),
m_ringList = new ImageRingList(this);
connect(m_ringList, SIGNAL(pixmapLoaded(QPixmap)), this, SLOT(pixmapLoaded(QPixmap)));
connect(m_ringList, SIGNAL(currentImageChanged()), this, SLOT(updateWindowTitle()));
QMenu *fileMenu = new QMenu(tr("File"), this);
fileMenu->addAction(tr("Open"), this, SLOT(openFile()), QKeySequence("Ctrl+O"));
@@ -90,7 +91,7 @@ void MainWindow::openFile()
if(standardLocations.size())
path = standardLocations.first();
QString file = QFileDialog::getOpenFileName(this, tr("Open file"), path, tr("Images (*.jpg *.png)"));
QString file = QFileDialog::getOpenFileName(this, tr("Open file"), path, tr("Images (*.jpg *.png *.JPG *.PNG)"));
if(!file.isEmpty())
{
QFileInfo info(file);