agent007se
27th June 2006, 14:47
Hello all !
I have some new questions but I'll begin with a "simple" one.
ui_muref.h (automatically generated from the .ui file itself from QtDesigner)
#ifndef UI_MUREF_H
#define UI_MUREF_H
#include <QtCore/QVariant>
...// (other default includes...)
class Ui_MainWindow
{
public:
...
QTreeView *treeView;
...
ui_murefimpl.h
#ifndef UI_MUREFIMPL_H
#define UI_MUREFIMPL_H
#include "ui_muref.h"
#include <qmainwindow.h>
#include <qwidget.h>
#include <qtreeview.h>
class ui_murefImpl : public QMainWindow
{
Q_OBJECT
public:
ui_murefImpl(QWidget *parent = 0);
QTreeView *qTree;
void buildQTree();
private:
Ui::MainWindow ui;
private slots:
void slotQuit();
// test slots
void slotTest();
};
#endif
ui_murefimpl.cpp
#include "ui_murefimpl.h"
#include <qwidget.h>
#include <qtreeview.h>
#include "ui_muref.h"
ui_murefImpl::ui_murefImpl(QWidget *parent) : QMainWindow(parent)
{
ui.setupUi(this);
// do connections
connect(ui.actionQuit, SIGNAL(activated()), this, SLOT(slotQuit()));
// test slots
connect(ui.actionTest, SIGNAL(activated()), this, SLOT(slotTest()));
// end
}
void ui_murefImpl::slotTest()
{
ui_murefImpl::buildQTree();
}
void ui_murefImpl::buildQTree()
{
// what to put here ?
}
The question is : "how to access to the treeView which is in the ui_muref.h" ??
My goal is to "configure" it by default with the function "buildQTree()" !
Thanks a lot for the first who solve this (noob) problem :p !
I have some new questions but I'll begin with a "simple" one.
ui_muref.h (automatically generated from the .ui file itself from QtDesigner)
#ifndef UI_MUREF_H
#define UI_MUREF_H
#include <QtCore/QVariant>
...// (other default includes...)
class Ui_MainWindow
{
public:
...
QTreeView *treeView;
...
ui_murefimpl.h
#ifndef UI_MUREFIMPL_H
#define UI_MUREFIMPL_H
#include "ui_muref.h"
#include <qmainwindow.h>
#include <qwidget.h>
#include <qtreeview.h>
class ui_murefImpl : public QMainWindow
{
Q_OBJECT
public:
ui_murefImpl(QWidget *parent = 0);
QTreeView *qTree;
void buildQTree();
private:
Ui::MainWindow ui;
private slots:
void slotQuit();
// test slots
void slotTest();
};
#endif
ui_murefimpl.cpp
#include "ui_murefimpl.h"
#include <qwidget.h>
#include <qtreeview.h>
#include "ui_muref.h"
ui_murefImpl::ui_murefImpl(QWidget *parent) : QMainWindow(parent)
{
ui.setupUi(this);
// do connections
connect(ui.actionQuit, SIGNAL(activated()), this, SLOT(slotQuit()));
// test slots
connect(ui.actionTest, SIGNAL(activated()), this, SLOT(slotTest()));
// end
}
void ui_murefImpl::slotTest()
{
ui_murefImpl::buildQTree();
}
void ui_murefImpl::buildQTree()
{
// what to put here ?
}
The question is : "how to access to the treeView which is in the ui_muref.h" ??
My goal is to "configure" it by default with the function "buildQTree()" !
Thanks a lot for the first who solve this (noob) problem :p !