-1

I'm developing a Qt GUI application on Debian. It's run well on my machine (development environment) but on other environments (ex: testing, ...) the GUI is not correct as on my development environment. This is the two example screenshot: enter image description here

Can you tell me why and how to fix this issue? Thank you very much!

aviit
  • 1,957
  • 1
  • 27
  • 50
  • 5
    Try using [layouts](http://doc.qt.io/qt-4.8/qgridlayout.html) – davlet Mar 26 '15 at 04:07
  • The layouts didn't resolve my problem. I used property "sizePolicy (stretch)". This resolved my problem. Thanks all! – aviit Mar 27 '15 at 06:30

2 Answers2

0

Put all labels and edit fields in a QGridLayout which will display it properly in a grid.

Example:

gridLayout = new QGridLayout(parent);
gridLayout->addWidget(new QLabel("Secret key"), 0, 0); // row 0, column 0
gridLayout->addWidget(new QLineEdit, 0, 1); // row 0, column 1
...
falkb
  • 1,294
  • 11
  • 35
0

The layouts didn't resolve my problem. I used property "sizePolicy (stretch)". This resolved my problem. Thanks all!

aviit
  • 1,957
  • 1
  • 27
  • 50