Unsolved QGraphicsView sizeIncrement
-
I hope you can help me. I couldn't resize the QGraphicsView incremental 20.
main.cpp
#include <QApplication>
#include <QGraphicsView>int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QGraphicsView *view = new QGraphicsView();
view->setSizeIncrement(20, 20);
view->show();
return a.exec();
}I tried to create a View class and inherit from QGraphicsView, for function overloading
void View::resizeEvent(QResizeEvent event)
I was thinking of doing it so
this->resize(20std::round(this->width()/20), 20*std::round(this->height()/20));
BUT I can't do anything. -
Hi and welcome to devnet,
What OS are you running ?
Did you notice the warning in the sizeIncrement property documentation ?
-
I use Ubuntu 16.04. Yes, I watched the documentation. I'm interested in how you can implement similar functionality as sizeIncrement yourself, or something like that.
-
You'll have to check that with the Window Manager used by your Linux distribution.