This is a good idea but not full-proof.
first, the database will be a problem. if it's online database, internet connection is required.
second. it's easy to crack. it's also easy to mask and change imei software way.
if each build has different imei in it then on download page, we need server backend (php,asp etc...) to compile app and give download.
example in php:
<?php
// code to write IMEI in main.cpp goes here
// bellow you see how server compiles app for you
exec("c:\qtsdk\symbian\sdks\symbian3qt474\bin\qmake.exe -spec ..\..\..\..\QtSDK\Symbian\SDKs\Symbian3Qt474\mkspecs\symbian-sbsv2 CONFIG+=release -after OBJECTS_DIR=obj MOC_DIR=moc UI_DIR=ui RCC_DIR=rcc -o bld.inf MaskBrowser.pro");
// then here we can place code that will give user the compiled sis file
?>
EDIT: also most of websites run on linux so qmake path will be different.
EDIT 2: most servers/hosting providers have exec() function disabled so it may not work. so we need our own server (or at least VPS Server or Dedicated Server) to pull this off. I can help with php side if you guys want.