Two Charts (widgets) in a Window
Unsolved
General and Desktop
-
Hi Guys,
i have a Question.
can sb tell me how to set two widgets in a window ?For example i Created two
QChartView *chartView = new QChartView(chart);
QChartView *chartView1 = new QChartView(chart1);normally i am using
window = new QMainWindow();
window->setCentralWidget(chartView);to set the chartView in the middle.
Is it possible to set now both Chartviews side by side ?Thanks For your Help!!!
-
This is a quick and dirty example, but something like this:
QFrame* centralFrame = new QFrame(); QHBoxLayout* myLayout = new QHBoxLayout; myLayout->addwidget(chartView); myLayout->addwidget(chartView1); centralFrame->setLayout(myLayout); setCentralWidget(centralFrame);
Cheers!