Open multiple xml files in qt
-
I have to open 3 different xml files in 3 different tab widgets in qt.
Can anyone suggest how I should do this?
Is it possible to open more than 1 xml file in qt at a time? -
@JonB I am unable to open multiple XML files in QT in different functions using QFile. Can you please guide me towards what I should use?
The program crashes if I try to open more than 1 XML file at a time.
QFile f("C:/Users/Tanya/Desktop/QTProblems/finalproject/features.xml") ;
QFile filename("C:/Users/Tanya/Desktop/QTProblems/finalproject/ages.xml") ;
QFile file("C:/Users/Tanya/Desktop/QTProblems/finalproject/characters.xml") ;Thank you so much for your help @JonB
-
@JonB I am unable to open multiple XML files in QT in different functions using QFile. Can you please guide me towards what I should use?
The program crashes if I try to open more than 1 XML file at a time.
QFile f("C:/Users/Tanya/Desktop/QTProblems/finalproject/features.xml") ;
QFile filename("C:/Users/Tanya/Desktop/QTProblems/finalproject/ages.xml") ;
QFile file("C:/Users/Tanya/Desktop/QTProblems/finalproject/characters.xml") ;Thank you so much for your help @JonB
@QtisHard
I have no idea why this is. It really doesn't matter whether you have multiple XML files or multiple any-kind of files. Each file/XML file/QFilehas (or should have) nothing to do with one another. You have some error in your code if it "crashes" or one interferes with another. -
Use a debugger to see exactly where it is crashing. I would create a function that takes a filename QString as a parameter and that returns a QString that contains the contents of the given file. You would then call that function once for each of your XML files.
Show more of your code; you've only shared code that creates three instances of
QFile.