Я работаю над небольшой тестовой программой (переводчиком), чтобы войти в QtDesigner.Вот как это выглядит в конструкторе:
![enter image description here](https://i.stack.imgur.com/3EWQ1.png)
Как видите, два комбинированных списка имеют разную ширину - я не менял значения ширинывручную, я только изменил alingment и макет.вся левая половина и правая половина являются ИДЕНТИЧНЫМИ, кроме текста, за исключением , что левое текстовое поле является QTextEdit, а правое - QTextBrowser.
Кажется, что ничего не имеет ка также элементы, хранящиеся в полях со списком, и я, к сожалению, не могу вручную изменить размер элементов, потому что кажется, что они связаны в макете.
Может кто-нибудь сказать мне, что здесь происходит?Это не большая проблема, но на нее больно смотреть.
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>711</width>
<height>402</height>
</rect>
</property>
<property name="maximumSize">
<size>
<width>790</width>
<height>402</height>
</size>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget">
<property name="minimumSize">
<size>
<width>663</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>795</width>
<height>414</height>
</size>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<layout class="QVBoxLayout" name="InputLayout">
<item alignment="Qt::AlignHCenter">
<widget class="QLabel" name="Label_Input">
<property name="text">
<string>Input:</string>
</property>
</widget>
</item>
<item>
<widget class="QTextEdit" name="Text_Input">
<property name="undoRedoEnabled">
<bool>false</bool>
</property>
<property name="html">
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="Combo_Input">
<property name="enabled">
<bool>true</bool>
</property>
<item>
<property name="text">
<string>Auto</string>
</property>
</item>
<item>
<property name="text">
<string>en</string>
</property>
</item>
<item>
<property name="text">
<string>de</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item row="0" column="1">
<layout class="QVBoxLayout" name="ButtonLayout">
<item>
<widget class="QPushButton" name="Button_Translate">
<property name="text">
<string>=></string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="Button_Swap">
<property name="text">
<string><-></string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="2">
<layout class="QVBoxLayout" name="OutputLayout">
<item alignment="Qt::AlignHCenter">
<widget class="QLabel" name="Label_Output">
<property name="text">
<string>Translated result:</string>
</property>
</widget>
</item>
<item>
<widget class="QTextBrowser" name="Text_Output">
<property name="html">
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="Combo_Output">
<item>
<property name="text">
<string>en</string>
</property>
</item>
<item>
<property name="text">
<string>de</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections/>
</ui>
Еще одна большая проблема, с которой я сталкиваюсь, пытаясь это исправить, заключается в том, что я больше не могу изменять выравнивание выпадающих списков после нарушения макета и настроек.их минимальные размеры - даже после того, как я вернул Ctrl + Z туда, где он был раньше!