Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
I have a combo box that can be shrunk to a size where not all text fits, currently the text on the left side is cut of in such a case, is there a possibility to cut of on the right side?
Thanks for the hint, got this solution working for me:
The only part that I'm not happy with is the hard coded button width, would have been nice if I could find that dynamically.
auto fit_text = m_fileNameLabel->fontMetrics().elidedText( file_info.fileName(), Qt::ElideRight, m_fileNameLabel->size().width() ); m_fileNameLabel->setText( fit_text );
I am using elidedText for my qlabel. It may be useful for you as well.
@dporobic query the width of the button inside resizeEvent(QResizeEvent * event). It is dynamic.