Re: QPushButton elide text
Are you passing an appropriate width value?
I.e. if you call metrics.width(qText), how many pixels does it need vs. what you are giving to elided text as available width?
Cheers,
_
Re: QPushButton elide text
Do you mean to say that I should pass the width of the button (198 px here) explicitly instead of textSnippet->width()-5?
Re: QPushButton elide text
Since your textSnippet widget has not yet been displayed it is entirely possible it has no meaningful width of its own.
Re: QPushButton elide text
Hmm, makes sense. Will try to pass the width explicitly and let you guys know..
Added after 42 minutes:
Right. It totally works when I call the method after setting the width for the button. Pretty dumb of me to ask. :)