죄송합니다. 바보 같은 질문 인 경우 죄송합니다. 나는 게으르지 않고있다. 나는 과 함께 Qt 4을 가진 C++ GUI 프로그래밍을 따르고 있으며이 책의 예제 중 하나는 Qt가 어떻게 작동하는지에 따라 다릅니다.개체 속성에 어떻게 액세스합니까?
대화를 만들어 신호와 슬롯을 연결합니다. 글쎄 그건 효과가 없으므로 현실 검사를 시도했다. 개체 속성을 수동으로 편집 할 수도 없습니다. 여기
은 여기 내 대화 .cpp 파일
#include "gotocelldialog.h"
#include "ui_gotocelldialog.h"
#include <iostream>
using namespace std;
GoToCellDialog::GoToCellDialog(QWidget *parent) :
QWidget(parent),
ui(new Ui::GoToCellDialog)
{
cout << "!!!!!!!!!!!!!!!!!!!!!"; // i never see this
ui->setupUi(this); // but if i comment out this it doesnt init
ui->okButton->setEnabled(true); // this does nothing
}
GoToCellDialog::~GoToCellDialog()
{
delete ui;
}
#include <QApplication>
#include <QDialog>
#include <iostream>
#include "ui_gotocelldialog.h"
using namespace std;
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
Ui::GoToCellDialog ui;
QDialog *d = new QDialog;
ui.setupUi(d);
d->show();
return app.exec();
}
주이며, 여기입니다 디자인 모드에서 GoToCellDialog 양식
기본적으로 비활성화되어있는 okButton을 활성화하려고합니다. 또한, 만약 내가 면접 < < "abc"; 그것은 나타나지 않습니다. 이걸 좀 밝힐 수 있니?
혼란 스럽지만 조금 도움이됩니다. 더 혼란 스럽기 때문에이 섹션을 건너 뛰어야 할 수도 있습니다. – user1873073