darksaga
21st May 2007, 15:40
Hi all,
maybe I'm blind, but I didn't find any way to set the preferred height of a QTextEdit?
what I'm trying to do:
QDockWidget m_dockLog = new QDockWidget("", this);
m_dockLog->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea | Qt::BottomDockWidgetArea);
QTabWidget m_logTabWidget = new QTabWidget(m_dockLog);
m_logTabWidget->setTabPosition(QTabWidget::South);
QTextEdit m_textEditLog = new QTextEdit(m_logTabWidget);
m_logTabWidget->addTab(m_textEditLog, "");
m_dockLog->setWidget(m_logTabWidget);
I tried to set the preferred height using:
m_textEditLog->resize(QSize(m_textEditLog->width(),100)); but this does nothing.
using
m_textEditLog->setMaximumHeight(100); also doesn't solve the prob, coz then the Textedits height won't change when you change the height of the QDockWidget.
hope somebody knows a solution...
greetz
darksaga
maybe I'm blind, but I didn't find any way to set the preferred height of a QTextEdit?
what I'm trying to do:
QDockWidget m_dockLog = new QDockWidget("", this);
m_dockLog->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea | Qt::BottomDockWidgetArea);
QTabWidget m_logTabWidget = new QTabWidget(m_dockLog);
m_logTabWidget->setTabPosition(QTabWidget::South);
QTextEdit m_textEditLog = new QTextEdit(m_logTabWidget);
m_logTabWidget->addTab(m_textEditLog, "");
m_dockLog->setWidget(m_logTabWidget);
I tried to set the preferred height using:
m_textEditLog->resize(QSize(m_textEditLog->width(),100)); but this does nothing.
using
m_textEditLog->setMaximumHeight(100); also doesn't solve the prob, coz then the Textedits height won't change when you change the height of the QDockWidget.
hope somebody knows a solution...
greetz
darksaga