[PyQt] MdiSubWindows: what causes inactive (or hidden) subwindows?
Anonymous
junk_and_mail at yahoo.com
Tue Nov 25 02:10:36 GMT 2008
> From: David Boddie <david at boddie.org.uk>
> Subject: Re: [PyQt] MdiSubWindows: what causes inactive (or hidden) subwindows?
> To: pyqt at riverbankcomputing.com
> Date: Monday, November 24, 2008, 6:41 PM
>
>
> What happens when the QMdiArea is configured to use
> SubWindowView?
The following messages show up in standard output:
QPainter::begin: Cannot paint on a null pixmap
QPainter::setRenderHint: Painter must be active to set rendering hints
> If you post a minimal or short code example then maybe we
> can help you figure
> out what's happening.
Here's the relevant function, it gets called when the itemDoubleClicked() signal is emitted:
def addTab(self, cItem = None, col = None):
sub = QtGui.QMdiSubWindow(self.ui.BibleArea);
sub.setAttribute(Qt.WA_DeleteOnClose);
textEdit = QtGui.QTextEdit();
textEdit.setReadOnly(True);
textEdit.setFocusPolicy(Qt.NoFocus);
textEdit.setMouseTracking(True);
textEdit.__class__.mouseMoveEvent = self.getLinkRef;
sub.setWidget(textEdit);
if cItem is not None:
sub.setWindowTitle(str(cItem.text(col)));
self.viewBook(str(cItem.text(col)), textEdit);
else:
sub.setWindowTitle(self.defBible);
self.viewBook(self.defBible, textEdit);
More information about the PyQt
mailing list