Added variable width for textboxes

Hi, I needed to have a smaller textbox than the long one used in qbdevice so I made some minor changes. Right now I use my fork but it could be convenient if we used the same version.