[PyQt] Compacting long file names or strings

Timothy W. Grove tim_grove at sil.org
Wed Jan 16 09:54:43 GMT 2013


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???

Best regards,
Tim Grove


More information about the PyQt mailing list