I went through the same thing a few days ago. I found this first block on web somewhere. If the form factor is not planar then you know you are in a panel. I did not have much luck with the popup extenders. But, this will allow it to at least dock sensibly to a panel.
def init if (self.formFactor() == Plasma.Planar): self.planar = True self.horizontal = False elif (self.formFactor() == Plasma.Horizontal): self.planar = False self.horizontal = True elif (self.formFactor() == Plasma.Vertical): self.planar = False self.horizontal = False # panel icon if not self.planar: self.icon = MbPanelIcon() layout = QGraphicsLinearLayout(Qt.Vertical) self.setLayout(layout) layout.addItem(self.icon) self.icon.updateIcon(self.geometry()) return -- Regards, Nate Carson _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel