首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > QT开发 >

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

2012-05-01 
qt中error: tertiaryGroupBox was not declared in this scope这是自己定义的一个类#include QtGui#in

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(); 

热点排行