I did a little more research and found out something interesting.

First, If I don't put the line
Qt Code:
  1. a.setStyle("gtk+");//a is a QApplication
To copy to clipboard, switch view to plain text mode 
in my code, I don't have this problem.

Also, I tried to change the visual effect options on Gnome and found out that if I put normal or high visual effect(I was originally at none), the window is maximizing even with the gtk+ set style, but with the style I have another problem which is that when clicking on the window, the window itself resize and move.

Funny thing, with qt designer and the gtk+ style, with no visual effects the window doesn't offer the maximize button, with visual effects there is a maximize button and everything works fine.

Does someone know about this problem?