Dimitri Frederickx wrote:
> I'm creating a QFile and with the constructor I'm passing the location
> of the file:
>
> QFile stylesheetFile = new QFile("classpath:stylesheets/default.css");
>
> When I call the method:
> stylesheetFile.open(QIODevice.OpenModeFlag.ReadOnly);
>
> the method returns false. My code worked under Qt Jambi 4.3, and I
> didn't do any code change. When I replace the file location with an
> absolute path, everything is working fine.
>
> So it seems that the "classpath:" functionality is broken in Qt Jambi
> 4.4. Did something changed in Qt Jambi 4.4?
Hi, Dimitri.
I've just returned to this problem, and was hoping to get some more
information from you. As you may recall, there was a different problem
with creating an icon on the class path which we believed to be related
to your problem. However, I have found the cause of the bug with QIcon,
and it is definitely not the same issue as the one you're having.
Furthermore, I am not able to reproduce the problem you have outlined
above. If I place a file in my class path on the disk, and then try to
open it with QFile, the open() method returns true for me.
Could I ask to get the contents of your class path, please? Maybe there
is something particular to your set up which is causing this?
Could you perhaps try to access any other files known to be on the class
path, like e.g. the .class file of your application? Does the problem
persist?
Also, how are you running the application and how are you passing in the
class path? Is it from an IDE or from the command line, and are you
passing the class path as an option to the virtual machine, or are you
setting the CLASSPATH environment variable in your shell?
-- Eskil
_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest