X11 doesn't have a clipboard standard except for the select/middle click method (as opposed to Ctrl+C). KDE and GNOME are supposed to allow you to interchange clipboard contents, but incompatibilities still abound. I use Konqueror and Kate on GNOME, and I notice copy/paste problems even when copying and pasting in the same KDE window! I think your problem is a bug in GNOME or Qt, not your program. There might be a way to work around it to improve things, though, but I don't know what that'd be (tell the guys at Qt or GNOME if you find one
).
In conclusion, try testing your program on KDE if you use GNOME normally, or vice versa. Maybe even try it on Fluxbox or something. I'm guessing KDE will be more likely to work when working with the clipboard, primarily because it's based on Qt, and you are making a Qt program.