Although searching for awhile, I can not find any clear answer of what benefits there is for compiling 64bit programs over 32 bit. There are many questions I find on SO on how to compile for 32 or 64 bit, and some questions about the 64bit versions of opengl, but they do not address the base question of why.
From what I find, it is difficult to use the MinGW compiler for 64 bit as there doesnt seem to be an official release from QT. Currently I use MinGW 32 bit for making a 3d opengl application that is heavily focused on speed with large sets of vertices (using VBO to handle it). I assume I would switch to visual studio for windows releases, and maybe use unofficial releases of 64bit for other platforms.
Since I have yet to find an OS which the compiled 32 bit version does not work, but since the target deployment of my application will be primarily on high end computers in research environments, I am fine with releasing 64 bit versions.
If the code is the same, is there a distinct advantage to switching the compiler from 32 to 64 bit for an application using Qt 5 and OpenGL?
You'll need to make sure your dependency libraries are compiled for 64-bit, but after that the advantages are primarily things like access to more RAM (4+gig in a single process) and possibly faster data access times (due to a larger word size). The second one depends heavily on your data access patterns and on how much the predictive cache can help, so it's hard to know if it will help much. For most random access patterns, it doesn't help in a measurable way, and it's typically outweighed by what you do with the data anyway.
For OpenGL, it won't really make much difference.