Results 1 to 5 of 5

Thread: Resource file in a lib

  1. #1
    Join Date
    May 2007
    Location
    Brazil
    Posts
    9
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Resource file in a lib

    Is it possible to relate a .qrc in a lib? if yes, how could I do that?

    Best regards.

    Rodrigo Amorim

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Resource file in a lib

    could you explan a bit more what do you mean?
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. The following user says thank you to high_flyer for this useful post:

    Rodrigo (25th June 2007)

  4. #3
    Join Date
    May 2007
    Location
    Brazil
    Posts
    9
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Talking Re: Resource file in a lib

    Of course

    I'm creating some plugins for my application, some of the plugins are creating new widgets, new tabs and so on.

    those widget created by the plugins, there are some icons in it, i would like to put the icons in a resource file, but in this case i'm not doing an application, i'm doing a lib. I created a .qrc and i called it in my plugin, but it didn't work.

    so, i'd like to know if there is a way to associate a .qrc file in my plugins (lib)


    i'm sorry about my english!

    Thank you in advance.

  5. #4
    Join Date
    Jan 2006
    Posts
    128
    Thanked 28 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Resource file in a lib

    Quote Originally Posted by Rodrigo View Post
    so, i'd like to know if there is a way to associate a .qrc file in my plugins (lib)
    You do it the same way as you would in your app. (i.e. via the RESOURCES qmake variable).

    But: read the the Resource System part of the Qt documentation; especially the last paragraph.
    If there is a possibility that your library is getting linked statically, you must use Q_INIT_RESOURCE.

  6. The following user says thank you to camel for this useful post:

    Rodrigo (25th June 2007)

  7. #5
    Join Date
    May 2007
    Location
    Brazil
    Posts
    9
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Talking Re: Resource file in a lib

    I solved my problem, i forgot to put in the .qrc file the following line:

    Resource += plugin

    when i inserted that, it worked perfectly!

    thanks

Similar Threads

  1. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21
  2. Replies: 2
    Last Post: 8th March 2007, 21:47
  3. Sending Binary File with QFTP
    By nbkhwjm in forum Newbie
    Replies: 2
    Last Post: 7th March 2007, 18:10
  4. Resource Collection File maximux size
    By Lele in forum Qt Programming
    Replies: 1
    Last Post: 9th August 2006, 10:41
  5. File permission QFile::WriteOther on Win Dos
    By patrik08 in forum Newbie
    Replies: 1
    Last Post: 13th June 2006, 14:16

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.