海思平台运行qt程序,界面自动全屏,无法调整大小,如何解决?

海思平台运行qt程序,界面自动全屏,无法调整大小
是不是设置了自适应屏幕分辨率?

Crack and Patch it!

1、右击ui文件——>选择“用…打开”——>选择“普通文本编辑器”
2、把你的ui文件中关于窗口大小的这段代码,修改成如下这段,保存一下,重新右击ui文件——>选择“用…打开”——>选择“界面编辑器”打开你的ui文件,就能恢复正常了。

<property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
    <width>1024</width>
    <height>1024</height>
   </rect>
  </property>
  <property name="sizePolicy">
   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
    <horstretch>0</horstretch>
    <verstretch>0</verstretch>
   </sizepolicy>
  </property>
  <property name="minimumSize">
   <size>
    <width>0</width>
    <height>0</height>
   </size>
  </property>
  <property name="maximumSize">
   <size>
    <width>5000</width>
    <height>3000</height>
   </size>
  </property>


正常的能改变大小的窗口的代码如上,是有4部分的,这四部分的数据你可以根据自己的需要修改。

继承QDialog可以调整大小