I have a window where I will open a file and I will put in the principal window. The problem is that the variables It is of the principal window and It is not of this window
ui->nameEdit->setText(text);
ui->textEdit->setText(name);
ui->dateEdit->setDate(fecha);
error C2039: ‘nameEdit’ : is not a member of ‘Ui::pacientes’
How could do it?
when your
QComboBoxis filled correct, you want to set the directory on that item. for example you have 3 files in theQComboBoxfile1.dat, file2.txt and file3.xml.then i would connect the
QComboBox::currentIndexChanged(int index)signal to the function and do something like …QString pathToDirectory = "C://Users//Jaime//Desktop//interfaz//pacientes";QString currentFileName = cmb.currentText(); <br>
QFile file( QString("%1//%2").arg(pathToDirectory, currentFileName) ); <br>
// do stuff with that file