ASHFAQ is right, by default you have to choose between one or the other.
There is a way though. You should know this way is not supported. You can contact your local Qlik office and they will provide expert consultant that can build and support this for you.
The way is to customize Authenticate.aspx. By doing so, you can build whatever authentication method you want, for instance : try on AD, if it fails try on Custom. You will need to add two DSC providers (one for each) to resolve the groups of both directories.
This will most likely need that you switch to IIS if it's not already done.