Ejemplo n.º 1
0
void MainWindow::setupLayoutElementBugTest(QCustomPlot *customPlot)
{
	QCPLayoutGrid *topLayout = qobject_cast<QCPLayoutGrid*>(customPlot->plotLayout());

	QCPAxisRect *r = new QCPAxisRect(customPlot);
	r->addAxes(QCPAxis::atLeft);
	topLayout->addElement(0, 0, r);
}
Ejemplo n.º 2
0
void MainWindow::setupMarginGroupTest(QCustomPlot *customPlot)
{
	QCPLayoutGrid *topLayout =customPlot->plotLayout();

	QCPAxisRect *r = new QCPAxisRect(customPlot);
	topLayout->addElement(1, 0, r);
	r->addAxes(QCPAxis::atLeft|QCPAxis::atRight|QCPAxis::atBottom|QCPAxis::atTop);
	r->addAxes(QCPAxis::atLeft|QCPAxis::atRight|QCPAxis::atBottom|QCPAxis::atTop);

	QCPMarginGroup *group = new QCPMarginGroup(customPlot);
	topLayout->element(0, 0)->setMarginGroup(QCP::msAll, group);
	topLayout->element(1, 0)->setMarginGroup(QCP::msAll, group);
}