Quantcast
Channel: Installation and Deployment
Viewing all articles
Browse latest Browse all 22112

Shortening a label

$
0
0
I have a directory and file name in a QLabel. If the text is too long, it is making my window too wide. I have played with all of the size policy options I can think of but haven’t been able to make it allow the window to get narrower. I’d like to either find the option to allow me to resize the window despite this QLabel’s width or trip the contents of the QLabel to fit into the window. In other languages, I’ve calculated the width of the label, picked a spot in the middle and replaced enough characters with elipses to make it fit. Is there a routine already written to do that (along with integration procedures for someone getting used to Qt)? Thanks! SRG

Viewing all articles
Browse latest Browse all 22112

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>