I'm trying to use scrollarea, but I don't get scrollbars.
In my constructor I have
ui->setupUi(this);
Canvas = new JCanvas;
ui->scrollArea->setWidget(Canvas);
Canvas->setGeometry(0, 0, 0, 0);
ui->setupUi(this);
Canvas = new JCanvas;
ui->scrollArea->setWidget(Canvas);
Canvas->setGeometry(0, 0, 0, 0);
To copy to clipboard, switch view to plain text mode
where JCanvas is my implementation of QLabel.
Next, I load a picture and then
_image.load(_fileName);
_image = _image.scaledToWidth(_getSize.PictureWidth);
Canvas->setPixmap(&_image);
//...
qDebug()<<ui->scrollArea->geometry();
qDebug()<<_image.size();
QPixmap _image;
_image.load(_fileName);
_image = _image.scaledToWidth(_getSize.PictureWidth);
Canvas->setPixmap(&_image);
//...
qDebug()<<ui->scrollArea->geometry();
qDebug()<<_image.size();
To copy to clipboard, switch view to plain text mode
in the output for example I got
QRect(11,47 1498x1262)
QSize(1500, 1220)
so size of the pictura is bigger than my qscrollarea.
Here is a screenshot
zrzut ekranu1.jpg
Bookmarks