The problem I'm facing is with building a GenericDAO to implement all the basic CRUD operations, but I'm not sure how do I get the static reference from a QEntity.
Without a reference to the QEntity class it is difficult, so make sure you provide an instance to it to your DAO.
Another thing that I'm not sure of, is it mandatory to use the static reference from a QEntity to build queries or is it ok if I do a contructor call to get a new object. Also, what does the String in the constructor parameter signify?
No, it's not mandatory, it's a convenience instance. The constructor argument is the variable name. If you provide a custom instance, make sure that you use the same variable name consistently.
Also make sure that you use the latest Querydsl version. PEntity looks like a pre-2.0 class.
Here is an example of a generic DAO superclass for Querydsl JPA usage https://github.com/querydsl/querydsl/blob/master/querydsl-examples/querydsl-example-jpa-guice/src/main/java/com/querydsl/example/jpa/repository/AbstractRepository.java
Update
If you want to avoid passing the Q-type to your DAO class you can use a pattern like this https://github.com/spring-projects/spring-data-jpa/blob/master/src/main/java/org/springframework/data/jpa/repository/support/QueryDslRepositorySupport.java#L54
The variable name will be the simple name of you entity class with the first letter converted to lowercase.