Hi there,

I have two question about QDockWidget. I hope I haven't found a bug!


1) I have a QDockWidget. I have set as widget a class derived from QWidget that contains 4 QFrames. Inside each frame there are different widgets.
My goal is to save vertical space, by making the widgets really close among them.

I have tried to use setSpacing(1) to the main QVBoxLayout (the one that separates the QFrames) and it works.

The problem is inside the QFrame.. if I try to do the same inside the QFrame it doesn't work. I have read other posts and it seems that dealing with QDockWidget is not simple.. is this a known bug?

2) I have set a background color for the QDockWidget doing:

Qt Code:
  1. QPalette playbackPalette(playbackManagementDock_->palette());
  2. playbackPalette.setColor(playbackManagementDock_->backgroundRole(), QColor(207,205,202));
  3. playbackManagementDock_->setAutoFillBackground(true);
  4. playbackManagementDock_->setPalette(playbackPalette);
To copy to clipboard, switch view to plain text mode 

The background is correctly changed but there is a problem related to the various QLineEdits that it contains.
When one of these widgets changes text (using the setText() method), for some reason, a rectangular object (by the way, of a different color) is being drawn in correspondence of the widget. The QLineEdit has rounded borders.. it's like if a bounding rectangle is being drawn without reason..

Do you know a method to prevent this, possibly without setting properties on the various QLineEdit?


Cheers