PDA

View Full Version : Plz check it



evgenM
10th January 2007, 14:01
i have subclass QFileDialog


FileDialog::FileDialog(QWidget * parent, Qt::WindowFlags flags)
: QFileDialog ( parent, flags )
{
setLabelText(QFileDialog::LookIn, tr("text1")); //...OK
setLabelText(QFileDialog::FileName, tr("text2")); // text staying == "File name:"
setLabelText(QFileDialog::FileType, tr("text3")); //...OK
setLabelText(QFileDialog::Accept, tr("text4")); //...OK
setLabelText(QFileDialog::Reject, tr("text5")); //...OK
}

plz somebody check it - it's my bug or not
Linux, qt4.2.2

guilugi
10th January 2007, 18:27
Hello !

I have just written a small code corresponding to your class, here it works just fine !

I attached an archive with the post...tell me if it works for you.

Guilugi.

evgenM
11th January 2007, 09:12
if add to example one more line


setFileMode(QFileDialog::ExistingFiles);

my bug appear

guilugi
11th January 2007, 09:42
Okay, I added your line, and I reproduced your 'bug', but I think they change the name on purpose, since you activated a mode for existing files...

I've checked the Qt sources :

if (mode == DirectoryOnly) {
d->fileTypeCombo->clear();
d->fileTypeCombo->addItem(tr("Directories"));
setLabelText(FileName, tr("Directory:"));
} else {
setLabelText(FileName, tr("File name:"));
}


So, it's not a bug ! :)