View Full Version : how to show dynamic size of text on QMessageBox without scroll bars

19th November 2014, 10:10

I need to show dynamic size of text on a message box without scroll bars coming into picture.

1. initially I have to show some short message (Error occurred...) on QMessageBox, with show more details and Cancel buttons.
2. once user press "show more details" button comes with a QMessageBox then, I have to show detailed text (size is dynamic) on the detailed area of message box.

so, now how I have to adjust the area of the Text edit which shows complete text, so that with out having scroll bars in it (I have to adjust the size of text edit or adjust the size of text so that complete text is visible in text edit without showing scrollbars).

Thanks in Advance.

21st November 2014, 11:46
maybe this post will help you: http://stackoverflow.com/questions/3050537/resizing-qts-qtextedit-to-match-text-height-maximumviewportsize