Can anyone point me to the right solution please with the following issue:
Got a QWidget, which is drawing a grid (simple lines) with QPainter. The size is set on a separate form (e.g.: 1024*1024 px with grid lines every 64 pixel)
The task is to get a scrollbar on the widget if the drawn grid is greater than the parent display area.
ui->setupUi(this);
m_mapDisplay.setParent(this);
ui->loMapDisplay->addWidget(ui->scrollArea);
ui->scrollArea->setWidget(&m_mapDisplay);
ui->scrollArea->setWidgetResizable(true);
ui->scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
ui->scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
QScrollArea? - G.M.