QmlDesigner.designModeWidget: fix style of error tooltip

DocumentWarningWidget is now derived from Utils::FakeToolTip and follows
the Qt Creator styling.
This commit is contained in:
Thomas Hartmann
2010-12-16 12:59:05 +01:00
parent 61edaf7716
commit b32873d3e6
2 changed files with 4 additions and 4 deletions

View File

@@ -90,13 +90,12 @@ namespace QmlDesigner {
namespace Internal { namespace Internal {
DocumentWarningWidget::DocumentWarningWidget(DesignModeWidget *parent) : DocumentWarningWidget::DocumentWarningWidget(DesignModeWidget *parent) :
QFrame(parent), Utils::FakeToolTip(parent),
m_errorMessage(new QLabel("Placeholder", this)), m_errorMessage(new QLabel("Placeholder", this)),
m_goToError(new QLabel(this)), m_goToError(new QLabel(this)),
m_designModeWidget(parent) m_designModeWidget(parent)
{ {
setFrameStyle(QFrame::Panel | QFrame::Raised); setWindowFlags(Qt::Widget); //We only want the visual style from a ToolTip
setLineWidth(1);
setForegroundRole(QPalette::ToolTipText); setForegroundRole(QPalette::ToolTipText);
setBackgroundRole(QPalette::ToolTipBase); setBackgroundRole(QPalette::ToolTipBase);
setAutoFillBackground(true); setAutoFillBackground(true);

View File

@@ -32,6 +32,7 @@
#include <coreplugin/minisplitter.h> #include <coreplugin/minisplitter.h>
#include <coreplugin/editormanager/ieditor.h> #include <coreplugin/editormanager/ieditor.h>
#include <utils/faketooltip.h>
#include <texteditor/itexteditor.h> #include <texteditor/itexteditor.h>
#include <integrationcore.h> #include <integrationcore.h>
@@ -78,7 +79,7 @@ class DesignMode;
class DocumentWidget; class DocumentWidget;
class DesignModeWidget; class DesignModeWidget;
class DocumentWarningWidget : public QFrame class DocumentWarningWidget : public Utils::FakeToolTip
{ {
Q_OBJECT Q_OBJECT
Q_DISABLE_COPY(DocumentWarningWidget) Q_DISABLE_COPY(DocumentWarningWidget)