Results 1 to 4 of 4

Thread: How to store huge data in a Qt software

  1. #1
    Join Date
    Jun 2011
    Location
    Porto Alegre, Brazil
    Posts
    482
    Thanks
    165
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default How to store huge data in a Qt software

    Hello!

    I'm developing a software that uses lots of images (hundreds) that are shown throughout the software as it's used. When it comes to acessing data, I know only two ways of doing it in Qt: using resources files and acessing the files direclty in folders sorrounding the executable. But the problem is that resource files don't allow me to add many images on them (for the time being, when I have something like 500+ images to show, I'm using something like 5 resource files to store them in an organized way) and I want the images to be IN the software, not in folders sorrounding it (let's say I don't want the images to be accessed apart from the software, but only by it).

    So is there another way to store this data so only the software is able to find it and that is not by resource files?

    I know that there is the SQL database, but as far as I know that would require a server where I would store the files and the software would download them each time it is used, or I could create a storage webpage and use Qt's network methods to download the files, but I don't want to make the software internet-dependent (it must me able to be accesible offline).


    Thanks,


    Momergil

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: How to store huge data in a Qt software

    Even if the images are combined the executable, one can access them using an hex editor. And storing 500 images inside the exe is a bad idea.

    Als for the SQL database you can use SQLite which do not need any configuration and the driver is already build in. But also there you need a protection. For that you can encrypt the database with AES (see an older article of mine in our Wiki about that).
    More simpler (and you shouldn't store images in a database) save the images encrypted in a normal folder using e.g. openssl.

    But even then your data is not save because you have to store the key in your application and with a hexeditor one can find it. Or replace the Qt dll with prepared ones... But that need some knowledge and criminal energy.

  3. #3
    Join Date
    Jun 2011
    Location
    Porto Alegre, Brazil
    Posts
    482
    Thanks
    165
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to store huge data in a Qt software

    Well, I guess I don't have much choice then. I'ld give a look at openssl and see what I can do.

    Thanks!

    Momergil

  4. #4
    Join Date
    Aug 2009
    Location
    Belgium
    Posts
    310
    Thanks
    10
    Thanked 31 Times in 25 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to store huge data in a Qt software

    You could also store the images in a password protected ZIP file (or any other archive format).

    QuaZIP can handle zip files, but I'm not sure about protected ones.

    Regards,
    Marc

Similar Threads

  1. QTcpSocket get disconnected when server is sending huge data
    By KernelCoder in forum Qt Programming
    Replies: 3
    Last Post: 1st April 2011, 08:45
  2. Sort huge data use QSortFilterProxyModel
    By jiaorenjie in forum Qt Programming
    Replies: 0
    Last Post: 16th March 2011, 02:56
  3. Need ideas on how to store data in SQL-Database
    By homerun4711 in forum Newbie
    Replies: 3
    Last Post: 5th January 2011, 23:10
  4. Replies: 5
    Last Post: 8th April 2008, 23:10
  5. How to store/get pointer on QTreeWidgetItem data?
    By Teerayoot in forum Qt Programming
    Replies: 2
    Last Post: 28th April 2007, 22:26

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.