[PyQt] Compacting long file names or strings
Wolfgang Rohdewald
wolfgang at rohdewald.de
Wed Jan 16 10:06:09 GMT 2013
Am Mittwoch, 16. Januar 2013, 09:54:43 schrieb Timothy W. Grove:
> Suppose I have a long file name such as "C:\Users\Public\Videos\Sample
> Videos\Wildlife.wmv" that I want to display on a button but there isn't
> enough room to display the entire name. I want to compact it down to,
> say, "C:\Users\...\Wildlife.wmv". I'm pretty sure that I've seen a
> method somwhere which will already do this; I just can't remember
> where... Does this ring any bells with anyone???
https://qt-project.org/doc/qt-4.8/qfontmetrics.html#elidedText
--
Wolfgang
More information about the PyQt
mailing list