#๐Ÿ”’ How to clear and refresh pie chart(PyQt)

10 messages ยท Page 1 of 1 (latest)

gentle surgeBOT
#

@lyric stump

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

lyric stump
#

Hi, I create a pie chart with data from my DB, I would like to refresh chart automaticly when I add new data to table. It's works because new chart is opening in new windows but I have no idea how to update chart in my program

jade delta
#

there's 2 possibilities depending on the implementation (which isn't shown here)

#

either you're implementing a model/view architecture, and in that case you just have to use the dedicated functions when you're updating the model (probably something like beginInsertData and endInsertData, or maybe beginResetModel, etc, pls refers to the documentation)

#

or you're not implementing model/view arch, and in that case, the component you're using probably have some functions to change its datas

#

if not, delete it and create it again can be a quick workaround

lyric stump
#

Good to know, I'll check these methods. Thanks a lot ๐Ÿ™‚

gentle surgeBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.