So currently a tool I developed has the ability to open two types of files - .xml & .tormatx(.tormatxis just a unique extension I'm using to enable users to not save them as .xml; just for consistency reasons)
void Tormat_Main
::open( const QString &p_fn
) { if( p_fn.isEmpty() ) { // ask user for a file
fileName
= QFileDialog::getOpenFileName(this, tr
("Open State"),
baseFolder, tr("TomatFiles (*.tormatx*.xml)"));
if (fileName.isEmpty()) { return; }
} else { // use passed file
void Tormat_Main::open( const QString &p_fn ) {
QString fileName;
if( p_fn.isEmpty() ) { // ask user for a file
fileName = QFileDialog::getOpenFileName(this, tr("Open State"),
baseFolder, tr("TomatFiles (*.tormatx*.xml)"));
if (fileName.isEmpty()) { return; }
} else { // use passed file
To copy to clipboard, switch view to plain text mode
Thats the code for opening a file...
My question is, how do I make it so if a user opens up a .xml extension, the program will automatically convert it to .xsps without any user interaction????
Thanks for the help guys
Bookmarks