correction:
the path with QSetting doesnt work
second one with QFileDialog::setHistory - doesnt work, too (as I said before).
As did I placed below:
step1. add public function to QFileDialog (yes, it should edit the Qt source)
//qfiledialog.h
void clearCurrentHistoryLocation();
//qfiledialog.h
void clearCurrentHistoryLocation();
To copy to clipboard, switch view to plain text mode
implementation:
//qfiledialog.cpp
{
d->clearCurrentHistoryLocation();
}
//qfiledialog.cpp
void QFileDialog::clearCurrentHistoryLocation()
{
Q_D(QFileDialog);
this->setHistory(QStringList());
d->clearCurrentHistoryLocation();
}
To copy to clipboard, switch view to plain text mode
step2. add function to QFileDialogPrivate
//qfiledialog_p.h
void clearCurrentHistoryLocation();
//qfiledialog_p.h
void clearCurrentHistoryLocation();
To copy to clipboard, switch view to plain text mode
implementation:
void clearCurrentHistoryLocation()
{
currentHistory.clear();
currentHistoryLocation=-1;
}
void clearCurrentHistoryLocation()
{
currentHistory.clear();
currentHistoryLocation=-1;
}
To copy to clipboard, switch view to plain text mode
it works, I garantee that)
Bookmarks