MCPcopy Create free account
hub / github.com/MITK/MITK / AdjustHeight

Method AdjustHeight

Modules/FormsUI/src/QmitkParagraphQuestionWidget.cpp:74–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74void QmitkParagraphQuestionWidget::AdjustHeight()
75{
76 QMargins contentsMargins = m_TextEdit->contentsMargins();
77 int documentHeight = static_cast<int>(m_TextEdit->document()->documentLayout()->documentSize().height());
78 int totalHeight = contentsMargins.top() + documentHeight + contentsMargins.bottom();
79
80 m_TextEdit->setFixedHeight(std::max(totalHeight, 50));
81}
82
83void QmitkParagraphQuestionWidget::OnTextChanged()
84{

Callers 2

OnTextChangedMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected