QString::chop() removes characters from the end of the string. "." is the 23rd (0-based) char, but calling chop() removes 23 characters and leaves you with "C:/U".
http://doc.qt.digia.com/4.7-snapshot/qstring.html#chop
Had you considered using QFileInfo so that it does the work for you? (http://qt-project.org/doc/qt-4.8/qfileinfo.html) That'll give you a bunch of handy functions to get paths, portions of the filename, etc.
(I'm more familiar with Qt 4.8, but I'm assuming chop() hasn't changed in Qt 5.0.)