int iw=0,ih=0;
float fwx=0.0f,fhx=0.0f;
iw = d->width();
ih = d->height();
if(iw !=0 && ih!= 0)
{
/* Finding ratio for other resolution, using this ratio value, the controls and windows to be resized accordingly*/
fwx = float(1280 - 2)/float(iw);
fhx = float(1024 - 8)/float(ih);
}
qf.setPointSizeFloat(float(10)/in_fWidthx);
LE_UserName->setGeometry(int(float(250)/in_fWidthx),int(float(30)/in_fHeightx),int(float(210)/in_fWidthx),int(float(30)/in_fHeightx));
LE_Password->setGeometry(int(float(250)/in_fWidthx),int(float(70)/in_fHeightx),int(float(210)/in_fWidthx),int(float(30)/in_fHeightx));
LE_UserName->setFont(qf);
LE_Password->setFont(qf);
int iw=0,ih=0;
float fwx=0.0f,fhx=0.0f;
QDesktopWidget *d = QApplication::desktop();
iw = d->width();
ih = d->height();
if(iw !=0 && ih!= 0)
{
/* Finding ratio for other resolution, using this ratio value, the controls and windows to be resized accordingly*/
fwx = float(1280 - 2)/float(iw);
fhx = float(1024 - 8)/float(ih);
}
QFont qf("Sans",10);
qf.setPointSizeFloat(float(10)/in_fWidthx);
LE_UserName->setGeometry(int(float(250)/in_fWidthx),int(float(30)/in_fHeightx),int(float(210)/in_fWidthx),int(float(30)/in_fHeightx));
LE_Password->setGeometry(int(float(250)/in_fWidthx),int(float(70)/in_fHeightx),int(float(210)/in_fWidthx),int(float(30)/in_fHeightx));
LE_UserName->setFont(qf);
LE_Password->setFont(qf);
To copy to clipboard, switch view to plain text mode
Bookmarks