网站服务器慢,免费php源码网,南通公司建站模板,做网页的软件html简短版本#xff1a;
splitter-setSizes({1000, 2000}); // 这个值至少跟像素值设置的一样大#xff0c;或者更大#xff0c;例如x10倍详细版本#xff1a; setSizes 官方介绍如下#xff1a; Sets the child widgets’ respective sizes to the values given in the…简短版本
splitter-setSizes({1000, 2000}); // 这个值至少跟像素值设置的一样大或者更大例如x10倍详细版本 setSizes 官方介绍如下 Sets the child widgets’ respective sizes to the values given in the list. If the splitter is horizontal, the values set the width of each widget in pixels, from left to right. If the splitter is vertical, the height of each widget is set, from top to bottom. Extra values in the list are ignored. If list contains too few values, the result is undefined, but the program will still be well-behaved. The overall size of the splitter widget is not affected. Instead, any additional/missing space is distributed amongst the widgets according to the relative weight of the sizes. If you specify a size of 0, the widget will be invisible. The size policies of the widgets are preserved. That is, a value smaller than the minimal size hint of the respective widget will be replaced by the value of the hint. 重点如下 splitter大小不会变化比设置的值多的和少的空间将会按照sizes之间的比例分配 size policy保留且widget至少有minmum size的最小值大小 网上说的setStetch方法对我不管用左边使用QTreeWidget右边是QWidget并且会受到sizePolicy和minimum size影响因此我并不推荐使用。