Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] Map resource file to QByteArray

[SOLVED] Map resource file to QByteArray

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 3.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AcerExtensa
    wrote on last edited by
    #1

    Hi,
    how can I load content of file added in project .qrc file to QByteArray?
    QWebView can display content with load QUrl("qrc:/Resources/404.html"), but I need to parse it first.
    I've tried QFile with filename "qrc:/Resource/404.html". but it doesn't work anyway...
    Any idea?

    God is Real unless explicitly declared as Integer.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      I guess you have seen "this":http://developer.qt.nokia.com/doc/qt-4.8/resources.html#using-resources-in-the-application

      BTW: there is a difference you use "Resources" and "Resource". If it is copy and paste from your source this might be the problem.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • A Offline
        A Offline
        AcerExtensa
        wrote on last edited by
        #3

        bq. BTW: there is a difference you use “Resources” and “Resource”. If it is copy and paste from your source this might be the problem.

        have just mistyped... :)

        Mistake was, I've used "qrc:/Resources/404.html" and not ":/Resources/404.html"

        Thanks!

        God is Real unless explicitly declared as Integer.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved