QDockWIdget title & body overlapping
-
Hi there, I'd like to have title overlapping with body by few pixels. Is there a way to do that?
-
Could you post a sketch or mockup of what you are after? It's not clear to me.
-
-
Hi ,
You can use styleSheets for the above requirement "QDockWidget Stylesheet":http://doc.qt.nokia.com/4.7-snapshot/stylesheet-examples.html#customizing-qdockwidget
i tried the following code to get the above look and feel.
@QString docStylesheet;
QString txtEditStyleSheet;docStylesheet += "QDockWidget::title { border: 4px solid #00A2E8;}";
txtEditStyleSheet += "QTextEdit { border-top: 0px solid gray; border-left: 4px solid gray; border-bottom: 4px solid gray;border-right: 4px solid gray;}";ui->dockWidget->setStyleSheet(docStylesheet);
ui->textEdit->setStyleSheet(txtEditStyleSheet);@I have placed a textEdit inside the dockWidget.
-
even if your solution works it just means that you solved my mockup exactly :) But the real thing I need is the title overlaps with body. So it should work in general not just for the border