PDA

View Full Version : Recent Project



bismitapadhy
29th May 2009, 20:20
I am trying to write program for recent project. I am using Qsetting for this.
To keep track of the project and its file can i use QFileList.Give me if u have any sample project for this.....

faldzip
29th May 2009, 23:16
Take a look at recent files example (http://doc.qtsoftware.com/4.5/mainwindows-recentfiles.html).

bismitapadhy
31st May 2009, 06:56
I am trying to write program for recent project. I am using Qsetting for this.
To keep track of the project and its file can i use QFileList.Give me if u have any sample project for this.....I already saw tutorial example.There its using QStringList.But i n case of recent project i hv to keep track of so many file not only only one file. So for that i have to use QFileList or anything else.

faldzip
31st May 2009, 08:24
You mean that your project contains a lot of files and you want to keep track to all those files?
I think that usual solution is (like everywhere - for example Qt .pro files) that you should keep the track to only one file - the project file. In that file you have all your paths to other files, so you need to implement some method like loadProject() which reads that project file and loads all the files containd in project. Then the Recent Project problem would be exactly the same as recent files with the recent files being your project files.
The project file could be, for example, in IniFormat so it could be easily read using QSettings, or for some complex structure it can be XML file, and read with for example Qt DOM API.