好像只 叫这个吧,Spacer,就是在UI中像弹簧那个,在代码中怎么用,比如我在两个PushButton 中加一个spacer,怎么实现?
------解决方案--------------------
horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
horizontalLayout->addWidget(button1);
horizontalLayout->addItem(horizontalSpacer);
horizontalLayout->addWidget(button2);