Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
4.8.4
-
None
-
Qt 4.8.4
1) KUbuntu 12.04.2, 64 bit
2) Windows XP SP3, 32 bit
Description
I have encountered following issue:
Here is small example:
Example.h
#ifndef EXAMPLE_H #define EXAMPLE_H #include <QWidget> class Example : public QWidget { Q_OBJECT public: explicit Example(QWidget *parent = 0); }; #endif // EXAMPLE_H
Example.cpp
#include "Example.h" Example::Example(QWidget *parent) : QWidget(parent, Qt::Tool) { setFixedSize(100, 100); setStyleSheet("border: 3px solid black; background-color: yellow;"); }
In such case instance of Example class have not applied style sheet for border (but it is ok with backgrond color).
But if I remove Q_OBJECT macro from header then all is ok - style sheet is fully applied to instance of Example widget.
Qt::Tool window flag is required. Without it, all works fine.
Full example is in attachment