Display QChartView in Dialog



  • Hello. I know I'm able to display a chart in the MainWindow by calling setCentralWidget(chartView).
    However, I want to display the chart in second Dialog(which inherits QDialog) when clicking on a push button, but it seems there's no setCentralWidget() function to call. How could I display the widget in another window than MainWindow ?


  • Lifetime Qt Champion

    Hi,

    You can use set a layout on your dialog and put your QChatView in the layout.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.