basicwidget.cpp 1006 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #include "basicwidget.h"
  2. #include "ui_basicwidget.h"
  3. #include "compareitemlistdialog.h"
  4. #include "DialogBase.h"
  5. #include "UIStyleManager.h"
  6. #include "customcombobox.h"
  7. BasicWidget::BasicWidget(QWidget *parent) :
  8. QWidget(parent),
  9. ui(new Ui::BasicWidget)
  10. {
  11. ui->setupUi(this);
  12. connect(ui->pBtn_compareItem, &QPushButton::clicked, this, &BasicWidget::do_pBtn_CompareItemClicked);
  13. /* 设置UI */
  14. UIStyle.registerWidget(this);
  15. /* 设置下拉框选项 */
  16. ui->comBox_notConsistency->setViewShadowEffect();
  17. ui->comBox_driverName->setViewShadowEffect();
  18. ui->comBox_recordMode->setViewShadowEffect();
  19. /* 测试用 */
  20. ui->comBox_driverName->addItem("AISO");
  21. }
  22. BasicWidget::~BasicWidget()
  23. {
  24. UIStyle.unregisterWidget(this);
  25. delete ui;
  26. }
  27. void BasicWidget::do_pBtn_CompareItemClicked()
  28. {
  29. CompareItemListDialog dlg;
  30. dlg.exec();
  31. // DialogBase dlg;
  32. // dlg.setTitle("测试标题");
  33. // dlg.resize(400, 300);
  34. // dlg.exec();
  35. }