メンバーとしてポインタとしてQt Uiを持っています。 cppでメンバーを割り当てたり使用しようとすると、うまくいきません。"poiner-to-incomplete"のためメンバーを使用できませんでした
関連性がないため表示されないコードがいくつかあります。
Krypto.h:
#pragma once
#include <ui_krypto.h>
#include <QMainWindow>
class Krypto : public QMainWindow
{
Q_OBJECT
public:
Krypto(QWidget * parent = NULL);
~Krypto();
private:
Ui::Krypto * Ui = NULL; //This is the Obj which couldn`t be used
};
Krypto.cpp:
#include "Krypto.h"
Krypto::Krypto(QWidget *parent) :
QMainWindow(parent)
{
ui = new Ui::Krypto(); //This don`t work
ui->setupUi(this); //And this don`t work
}
Krypto::~Krypto()
{
delete ui;
}
ui_krypto.h:
class Ui_Krypto
{
public:
QAction *actionCode_Encode;
QAction *actionKey;
QWidget *centralWidget;
QGroupBox *CodeEncodegroupBox;
QTextEdit *textausgabe;
QTextEdit *texteingabe;
QComboBox *CBAuswahl;
QCommandLinkButton *ReadyButton;
QLineEdit *KeyCodelineEdit;
QLabel *label;
QGroupBox *KeygroupBox;
QPushButton *gKeypushButton;
QLineEdit *keylineEdit;
...
void setupUi(QMainWindow *Krypto)
{
...
}
}
namespace Ui {
class Krypto: public Ui_Krypto {};
} // namespace Ui
ドイツ語のため申し訳ありませんが、私はhaven`tた設定それのための。ここ は失敗です:
'UI' ではない '宇井' と呼ばれるべきか? –
だから ''の中身は何ですか? 'Ui :: Krypto'クラス定義がないようです。 –
VTT
'Ui :: Krypto'のようなサウンドは、' 'の前方宣言にすぎません。 –