Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6075499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:30:06+00:00 2026-05-23T10:30:06+00:00

Currently I have my HTML, JS, CSS, graphics, etc stored locally on hard disk

  • 0

Currently I have my HTML, JS, CSS, graphics, etc stored locally on hard disk and access them using QWebFrame::SetUrl( QUrl::fromLocalFile( "appFolder\html\index.html" )). At some point I am going to need to encrypt the locally stored files so I’m looking for a way to either decrypt them as they’re requested or to decrypt them all into memory and access them that way.

I know I can use QWebFrame::setContent( htmlData ) to load the HTML from memory so I can load the encrypted HTML file, decrypt it in memory and then display it that way, but how would I go about the other data (JS, CSS, graphics, etc) which is currently stored in subfolders?

Alternatively, is there a way I can intercept requests for access to all the HTML, JS, CSS, etc files and decrypt them as they’re loaded?

By using my own NetworkAccessManager I can intercept calls to createRequest so I can see when each file is being loaded, but I can’t see how to use this to decrypt the data on the fly. I can also connect a slot function to the finished(QNetworkReply*) signal, but at that point the data has already been read – the QIODevice‘s current position is pointing to the end of the file.

I’d be very grateful for any advice or pointers in the right direction.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:30:06+00:00Added an answer on May 23, 2026 at 10:30 am

    I think in your case the best solution is to inherit QNetworkReply class and use this new class in reimplemented QNetworkAccessManager::createRequest() function.

    In general, you should reimplement next virtual functions of QNetworkReply:
    bytesAvailable(), readData(char *data, qint64 maxSize), close(), abort().

    For example, readData should be the folowing:

    qint64 NetworkReplyEx::readData(char *data, qint64 maxSize)
    {
        return m_buffer.read(data, maxSize);
    }
    

    where m_buffer is already decrypted data.

    Also you need to add all necessary logic in this class to get encrypted data, decrypt this data…
    In the end you should manually emit finished() signal inside new class, so QWebView or other related class will get decrypted html.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a html table with CSS. Currently all the cells have a white
I currently have the following script using CSS Sprites that toggles between active and
I am currently beginning my forays into HTML and CSS. Already I have become
I currently have all my web based files (.html .css. js) in one directory
I currently have some modest HTML/CSS Know-How and want to improve from there. I
I currently have two apps: app1/ app2/ templates/ app1.html app2.html In app1.html, I'm including
I currently have the following MySQL statement to replace the HTML entity for a
I currently have a product view page that contains an MVCContrib HTML Grid with
I have an html table with many rows. I'm currently grouping several rows inside
I have this command that I run every 24 hours currently. find /var/www/html/audio -daystart

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.