当前位置: 代码迷 >> QT开发 >> qt中error: 'tertiaryGroupBox' was not declared in this scope解决方案
  详细解决方案

qt中error: 'tertiaryGroupBox' was not declared in this scope解决方案

热度:319   发布时间:2016-04-25 04:51:17.0
qt中error: 'tertiaryGroupBox' was not declared in this scope
这是自己定义的一个类
#include <QtGui>
#include "ui_sortdialog.h"
#include "sortdialog.h"

sortDialog::sortDialog(QWidget *parent) :
  QDialog(parent),
  ui(new Ui::sortDialog)
{
  ui->setupUi(this);
tertiaryGroupBox->hide();
secondaryGroupBox->hide();
}

sortDialog::~sortDialog()
{
  delete ui;
}
这是ui_sortdialog.h文件 其中有tertiaryGroupBox的声明 请问一直提示我没有声明是怎么回事 如何解决
class Ui_sortDialog
{
public:
  QGridLayout *gridLayout_4;
  QGroupBox *primaryGroupBox;
  QGridLayout *gridLayout;
  QLabel *label;
  QComboBox *primaryColumnCombo;
  QSpacerItem *horizontalSpacer;
  QLabel *label_2;
  QComboBox *primaryOrderCombo;
  QVBoxLayout *verticalLayout;
  QPushButton *okButton;
  QPushButton *cancelButton;
  QSpacerItem *verticalSpacer;
  QPushButton *moreButton;
  QSpacerItem *verticalSpacer_2;
  QGroupBox *secondaryGroupBox;
  QGridLayout *gridLayout_2;
  QLabel *label_3;
  QComboBox *secondaryColumnCombo;
  QSpacerItem *horizontalSpacer_2;
  QLabel *label_4;
  QComboBox *secondaryOrderCombo;
  QGroupBox *tertiaryGroupBox;
  QGridLayout *gridLayout_3;
  QLabel *label_5;
  QComboBox *tertiaryColumnCombo;
  QSpacerItem *horizontalSpacer_3;
  QLabel *label_6;
  QComboBox *tertiaryOrderCombo;


------解决方案--------------------
C/C++ code
[color=#FF0000]ui->[/color]tertiaryGroupBox->hide();[color=#FF0000]ui->[/color]secondaryGroupBox->hide();
  相关解决方案