@JonnyQB
Start by printing out query.lastError() after executing statement, as @mrjj said. Almost anything could be the issue. You do not even say what message you get from your code, only "i just cant execute the query". There is also no message for Logindb.open() failing. We cannot guess.
@JonnyQB
Please take the time to read @SGaist's post; it's also in the Qt documentation. You have not spelled the environment variable as he typed, you have not used copy & paste, so what do you expect to happen if you do not get that correct?
@JonnyQB With QT_DEBUG_PLUGINS set you should now get some additional output from the application. You have to check that output to see why the plug-in was not loaded (you can also post it here).
@JonnyQB
We have said repeatedly what you need to set to get the debug output required in the replies above. Show us where you did what for that and we will look again....