Hi all, I need to use a QComboBox to let the user introduce the path to a directory. I have a button connected to a slot where I call to QFileDIalog::getExistingDirectory. So the user can choose a directory in the file system. When this dialog is closed I check if the path exists in the combo box with QComboBox::findText. If it's not present I call to QComboBox::addITem to add this new path. If it's present I call to QComboBox::setCurrentIndex with the index obtained from "findText". The problem is that it doesn't change the text that is shown in the combo box. Is it the correct behaviour or I am doing something wrong?
Thanks.


Reply With Quote
I had to convert the separator of the path with QDir::convertSeparators before check if it exists in the combo
Thanks

Bookmarks