How to make a resolution independent Ui
Is there any other way to make my Ui resolution independent. Right now i am using my own function to do so
Quote:
QDesktopWidget *mydesk = new QDesktopWidget() ;
double width = mydesk->width();
double hight = mydesk->height();
X_resolution = width/1600;
Y_resolution = hight/900;
and i am multiplying the controlls by this factor
Quote:
ui->SRP_labelY_8->setGeometry(static_cast<int>(ui->SRP_labelY_8->pos().x()*X_resolution), static_cast<int>(ui->SRP_labelY_8->pos().y()*Y_resolution), static_cast<int>(ui->SRP_labelY_8->size().width()*X_resolution), static_cast<int>(ui->SRP_labelY_8->size().height()*Y_resolution));
Is there some other way to do so ??
Re: How to make a resolution independent Ui
Is the layout manager does not solve your problem ?
Re: How to make a resolution independent Ui
For resolution independent UI one would usually use QtQuick.