@alizadeh91
I don't have a solution for you, only a warning. If you intend to parse arbitrary C++ files from anywhere, rather than some terribly cut-down subset whose layout you know intimately, you're going to find this very hard to do. Very, very hard!
Heck, you can't even write a grammar for parsing C++ source files because of the pre-processor, e.g. http://trevorjim.com/c-and-cplusplus-are-not-context-free/
To parse C and C++, you start by using a very powerful preprocessor. These preprocessors are inevitably written by hand (they are not based on a theoretic foundation like regular expressions or context-free grammars).
As far as I am aware, there is no open source which will produce a standalone parse tree for you. The consensus (search the web) is that you really need to try to leverage an existing C++ compiler to do such a job. You could look at gcc, or perhaps more likely clang. I still don't think you'll get what you want out of them.
If all you want to do is some hacky approximation which just extracts #include statements so that you can follow them then you could do something with QRegularExpressions. Correctly locating & extracting the definition of functions in .cpp/.h files will be harder --- you'll probably end up making all sorts of assumptions as to where definitions start & end more on a line-by-line basis than via regular expressions or proper parsing. It may do you for your purposes, provided you are happy with some vague approximation which is not robust.
Sorry, but good luck!