Smavis,
There is no custom code...
As long as you have the lookup field to the entity and that lookup entity have quick view form so it would be fine.
For example:
Entity Project (child) and Entity Account (Parent)
You want to have a quick view form to the Entity Account.
How to do?
Make sure Entity Project and Account are having N:1 Relationship,

it does mean if you go to Entity Project Form, you can see the lookup field to the Account there, if not, you need to have this lookup field to Account first.
Because you need to see the Account detail from the related Account through the lookup field right.
You go to the Entity Account, Customization -> Entities -> Account -> Form -> create a quick view form (Account might have out of the box quick view form, but you might add another one).

Include your detailed field

And do not forget to save it.
Until you can see your newly created Form.

*You can rename your Form, Edit it and go to Form properties -> Display

Do not forget to save it first and publish also recommended
Then you go to the Entity Project, Customization ->Entities -> Project -> Form
Modify one of your Main Form, then you put the lookup field, then choose the space you want to place the form, then insert the Quick View form.
Choose your lookup field name - in this case is Account Id

Choose the Quick View form (you can see your newly created Account QV Form).
Save it and publish all.
Hope this helps.
Thanks.