First of all, I would like to precise that the three main qualities that I'm going to list over here are based on my experience only. Thus, it might not be as accurate as it should be but will give some hints to those who are still wondering what are the main qualities that a men should have to attract the opposite gender. I'll list them from most to less important ones
Ladies like it when you are being honest with them. Being honest will allow to build trust, and all start from here. Such quality does not only apply in the case of attracting women, it is a trait that you should have that will help you in your life to gain respect, and more.
Everyone want to have fun, and in order to do so we have to be with someone that can make jokes, or be funny somehow. If you don't have it, I'm sure that there are ways to learn it.
I'll describe this one in the way of see it. Thus, I believe that a confident person is someone that is able to remain cool, and calm and knows when to stand up for himself and for others when needed.
Keep in mind that each woman has different preferences, and that each woman may look for different traits in a man.
Hoping that my first take was somehow helpful, and that most importantly you enjoyed reading it :)