[Qt-interest] maybe a qt bug?

tang ke tangk at lemote.com
Wed Aug 17 05:14:18 CEST 2011


I fixed it!!

The problem is that under Linux, you can not have identically named Qt
resource files (*.qrc) in both your shared library and application. This
is not a problem under Windows but under Linux it will only load one of
the identically named resource files. I had named resource files in both
my application and shared library files "resources.qrc". I renamed to
"resourcesmylib.qrc" and "resourcesmyapp.qrc" and all was good. I did
not need to add a call Q_INIT_RESOURCES to my library or call
qInitResources_resources*.

*Solution*

    * Use unique Qt resource file names for your library and application
      under Linux.


于 2011年08月15日 16:35, tang ke 写道:
> hi all guys:
> I write a library, and the library have the resources itself.and give a
> function to copy the resource file to disk.
>
> when I compile the library with windows, It works ok.
>
> but when I compile the library with ubuntu, It works fail.
>
> with ubuntu, the main execute use the QFile::copy static function is ok.
> but when use the library to QFile::copy function, It's error.
>
> I means:
> when the library has it's own resources file, and the main program has
> it's own resources file.
>
> how to copy the library's resources file?
>
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest


-- 
Best Regards


Tang Ke (Application develop of software department)
Tel:0086-512-52308628 Fax:0086-512-52308688
Phone:18962393077
E-mail:tangk at lemote.com  MSN:tangk at lemote.com, mumutouv at gmail.com
Web: http://www.lemote.com <http://www.lemote.com/>
JiangSu ZhongKe Lemote Technology Co.,Ltd
MengLan Industry Park,YuShan,ChangShu City,JiangSu,China

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tangk.vcf
Type: text/x-vcard
Size: 442 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110817/4f23015f/attachment.vcf 


More information about the Qt-interest-old mailing list