You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
689 B

1 year ago
1 year ago
  1. #include "zq_vtab_page.hpp"
  2. using namespace iflytop;
  3. using namespace std;
  4. ZQVTabPage::ZQVTabPage(QTabWidget *fathertab, const QString &zh_name) : QWidget(fathertab) { //
  5. QVBoxLayout *verticalLayout = new QVBoxLayout(this); // 设置布局
  6. this->setLayout(verticalLayout);
  7. m_layout = verticalLayout;
  8. fathertab->setUsesScrollButtons(true);
  9. fathertab->insertTab(fathertab->count(), this, zh_name);
  10. }
  11. void ZQVTabPage::addBox(QGroupBox *box) {
  12. m_layout->addWidget(box);
  13. }
  14. void ZQVTabPage::addSpacer() {
  15. m_verticalSpacer = new QSpacerItem(20, 1, QSizePolicy::Expanding, QSizePolicy::Expanding);
  16. m_layout->addItem(m_verticalSpacer);
  17. }