QtCharts and QDialog
-
wrote on 1 Sept 2022, 07:04 last edited by
Hi, I have a MainWindow with a pushbutton, and when i click the pushbutton, it shows a Dialog.
Now, I would like to show in that dialog a pie chart, but I've seen that, for most of the examples, the code to build and display a chart is written in main.cpp.
So, my question is, can I show a chart in a QDialog? And if yes, how can i do it? -
Hi, I have a MainWindow with a pushbutton, and when i click the pushbutton, it shows a Dialog.
Now, I would like to show in that dialog a pie chart, but I've seen that, for most of the examples, the code to build and display a chart is written in main.cpp.
So, my question is, can I show a chart in a QDialog? And if yes, how can i do it?@Davide00 said in QtCharts and QDialog:
can I show a chart in a QDialog?
Yes
"And if yes, how can i do it?" - what exactly is the problem? Simply add your chart as child widget in your dialog.
1/2