[QT4] Trivial question(s)
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)
Code:
#ifndef UI_MUREF_H
#define UI_MUREF_H
#include <QtCore/QVariant>
...// (other default includes...)
class Ui_MainWindow
{
public:
...
...
ui_murefimpl.h
Code:
#ifndef UI_MUREFIMPL_H
#define UI_MUREFIMPL_H
#include "ui_muref.h"
#include <qmainwindow.h>
#include <qwidget.h>
#include <qtreeview.h>
{
Q_OBJECT
public:
void buildQTree();
private:
Ui::MainWindow ui;
private slots:
void slotQuit();
// test slots
void slotTest();
};
#endif
ui_murefimpl.cpp
Code:
#include "ui_murefimpl.h"
#include <qwidget.h>
#include <qtreeview.h>
#include "ui_muref.h"
{
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 !
Re: [QT4] Trivial question(s)
ui.treeView->doSomething();