I am a student programmer using Qt to create a reading table for my company. This reader is both an editor and a converter. It reads in a .i file, allows editing a text document, and then produces a .scf file, which is essentially a split values ββfile laid out under a legend built with headers. I'm distracted ... Basically, the imported file format is very difficult to scan and read (mostly impossible), so I would like to modify the open preBuilt QFileDialog file to include an additional snapshot when older file types are selected to declare their template headers.
When the user selects the .i extension files (file type of option 2), I would like to include an additional drop-down menu so that the user can choose which type of .i file he (selected template). This way, I donβt have to deal with God, knows how many hours trying to figure out a way to index all the headers into a table for every other type. Currently, my importFile function is invoking a dialog using this:
QString fileLocation = QFileDialog::getOpenFileName(this,("Open File"), "", ("Simulation Configuration File(*.scf);;Input Files(*.prp *.sze *.i *.I *.tab *.inp *.tbl)"));
I was referring to the QFileDialog Documentation to try and find the solution that I needed, but didn't help. Thank you for reading my post and in advance for some direction that you can give about this.
UPDATE MAR 16 2012; First, I would like to thank Masks for his initial support in this matter. Below is the communication operator that I receive with the error I received.
//Declared data type QFileDialog openFile; QComboBox comboBoxTemplateSelector; connect(openFile, SIGNAL(currentChanged(const &QString)), this, SLOT(checkTemplateSelected())); openFile.layout()->addWidget(comboBoxTemplateSelector);
I also noticed that I didnβt like the way I added the QComboBox to the modified dialog layout (which is the second error). I really hope that I'm just doing something dumb here and its easy task to overcome.
In response to a comment by tmpearce heres my header code;
#include <QWidget> namespace Ui { class ReaderTable; } class ReaderTable : public QWidget { Q_OBJECT public: explicit ReaderTable(QWidget *parent = 0); ~ReaderTable(); public slots: void checkTemplateSelected(); void importFile(); void saveFile(); private: Ui::ReaderTable *ui; };
Thank you for reading and in advance for any contributions to this task!