[quote author="Luca" date="1316718066"]What solution can you suggest me?[/quote]
A reasonable price for your product and a real added value for paying customers (extended support, cloud features, etc.). Time beeing spent in improving your product instead of protecting it.
From the technical point of view there are a few things that should be taken into account to force at least the average customer to respect your restriction - you can't force anyone else anyways.
- Always encrypt and sign your data.
When storing data locally always encrypt and sign and do some sanity checks - otherwise it is edited in a minute. If it is encrypted and signed properly it doesn't matter where the data is stored (file, registry, etc.). It can be as simple as XOR - but you have to prevent recreation of valid data. If you rely on an active internet connection always use https and weave the servers public key into your application.
- Rely on valid data.
If there is no data or invalid data do not start up. The installer is responsible for creating inital data, not the application.
- Do not rely on system calls.
Especially when retrieving dates (this includes QDateTime and platform specific calls like GetSystemTime()). You can download application loaders and hypervisors around every corner nowadays which just hook into those system calls and annul your protection. The better way is to retrieve timestamps from system files which are accessed often (the pagefile or system log files).
Keep in mind that your protection should always correlate with the value of your application. The cost and amount of work for protection will "rise exponentially":http://www.blackhat.com/presentations/bh-europe-06/bh-eu-06-biondi/bh-eu-06-biondi-up.pdf to its efficiency and the amount of people it protects from - and is cracked in the end anyways. Software protection is science on its own, which includes anti-debugging and anti-reversing, encryption, hypervisor detection and a lot of other subjects.
There are a lot of ready-made software protection solutions out there (including time-based restriction). Probably they are feasible for you.
There is one more thing I want to add: Whatever you do - the software protection should be as invisible as possible to the end user. A demo is a showcase for your product and should convince people to spend money on it - which is pretty difficult if they are annoyed of the software protection. Nagware or Ubisoft's always-on copy protection is a prime example for this.