So, in the Qt namespace you get the following button enumerations. Is there a good way to tell which button is the forward button and which is the back?

On Linux, I understand that this is stored in something like xmodmap, even if I knew how to get that information programmatically, I'm still not sure how to map XButton1 or XButton2 to those values.

Constant Value Description
Qt::NoButton 0x00000000 The button state does not refer to any button (see QMouseEvent::button()).
Qt::LeftButton 0x00000001 The left button is pressed, or an event refers to the left button. (The left button may be the right button on left-handed mice.)
Qt::RightButton 0x00000002 The right button.
Qt::MidButton 0x00000004 The middle button.
Qt::XButton1 0x00000008 The first X button.
Qt::XButton2 0x00000010 The second X button.

Any ideas on how to do this? I would imagine someone out there has solved this problem. I was expecting to find the answer in one of Qt's webkit examples but didnt locate anything.