pyqtgraph warning message

52 views
Skip to first unread message

Vlado Kršlin

unread,
Dec 7, 2020, 5:44:33 PM12/7/20
to pyqtgraph

Hello, I have pyqt4 GUI app with graph access button. Everything works ok, except every time button is pressed warning message is appeared.
Button pressed calls bottom method "graph_all". So, what I am doing wrong or how to avoid this message? Modul graph_1.py is attached here to show the code.

Message 1 every time button is pressed: QGridLayoutEngine::addItem: Cell (3, 1) already taken

Message 2 only first time button is pressed: /home/pi/Project/main.py:538: RuntimeWarning: Visible window deleted. To prevent this, store a reference to the window object.
  sys.exit(app.exec_())

Regards Vlado
graph_1.py

Ognyan Moore

unread,
Dec 7, 2020, 5:55:04 PM12/7/20
to pyqt...@googlegroups.com
the Cell(#, #) already taken is a warning message emitted by the Qt system, which can safely be ignored.  I'm some of my applications, I have actually attempted to catch that specific warning just to ignore it... I'm not sure that warning is even emitted in more recent Qt5 messages.

In the code you have attached, I don't see how you're storing the QMainWindow (or QWidget) object, but I suspect this warning is being given when the garbage collector picks up on some window you had shown.

Also as it looks like you're doing datetime stuff, pyqtgraph has some support for that now.  You can see it in the CustomPlot example:


--
You received this message because you are subscribed to the Google Groups "pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/171d19c3-a84d-4bc0-9cf1-d905f1b0dc0bn%40googlegroups.com.

Vlado Kršlin

unread,
Dec 8, 2020, 2:16:54 AM12/8/20
to pyqtgraph
Thanks for your answer, I'll leave it as it is as far as it will work ok.

ponedeljek, 07. december 2020 ob 23:55:04 UTC+1 je oseba ognyan...@gmail.com napisala:
Reply all
Reply to author
Forward
0 new messages