You can use a diff editor from Qt Creator to compare two text files. They can be either versions of the same file or arbitrary files.
To compare files:
The differences are output in the Edit mode. Color coding is used to mark changed lines. By default, light red indicates lines that contain removed text (painted a darker red) in the left pane and light green indicates lines that contain added text (painted a darker green) in the right pane.
To change the default colors, select Tools > Options > Text Editor > Font & Colors. Create your own color scheme and select new colors for the following options:
To only show text changes, select Ignore Whitespace.
To expand the context for the changes, set the number of unchanged lines to show in Context lines. Set the value to -1 to show the whole file.
By default, the horizontal scroll bars in the left and right pane are synchronized. To use them independently of each other, select the (Synchronize Horizontal Scroll Bars) button.