trust88
3rd May 2013, 13:32
Hi all,
I have a crash on connect in constructor
BuilderAppInstanceUI::BuilderAppInstanceUI(const Workflow &wf)
:ObserverAdapter(wf)
{
connect(Datasets, SIGNAL(currentItemChanged(QListWidgetItem*,QListWi dgetItem*)), Variables, SLOT(datasetChanged(QListWidgetItem*,QListWidgetIt em*)));
}
with
Datasets and
Variables two members of
BuilderAppInstanceUI:
class BuilderAppInstanceUI : public QWidget
, public ObserverAdapter
{
Q_OBJECT
public:
BuilderAppInstanceUI(const Workflow &workflow);
~BuilderAppInstanceUI();
void retranslateUi(QWidget *Form);
void setupUi(QWidget *Form);
QStackedWidget *stackedWidget;
BuilderAppListWidget *Datasets;
QTreeWidget *Variables;
private slots:
void datasetChanged(QListWidgetItem* current, QListWidgetItem* previous);
};
BuilderAppListWidget inherits from
QListWidget and as such can emit this signal
SIGNAL(currentItemChanged(QListWidgetItem*,QListWi dgetItem*))
class BuilderAppListWidget : public QListWidget
{
Q_OBJECT
public:
BuilderAppListWidget (QWidget* qwdgt = nullptr);
~BuilderAppListWidget (){};
void dragEnterEvent( QDragEnterEvent * event ) ;
void dragMoveEvent( QDragMoveEvent * event ) ;
void dropEvent( QDropEvent * event );
void keyReleaseEvent( QKeyEvent * event ) final ;
private:
BuilderAppInstanceUI* m_instance ;
};
Should I declare explicitly
currentItemChanged in body for
BuilderAppListWidget class ? If not, where does problem come from ?
Regards
I have a crash on connect in constructor
BuilderAppInstanceUI::BuilderAppInstanceUI(const Workflow &wf)
:ObserverAdapter(wf)
{
connect(Datasets, SIGNAL(currentItemChanged(QListWidgetItem*,QListWi dgetItem*)), Variables, SLOT(datasetChanged(QListWidgetItem*,QListWidgetIt em*)));
}
with
Datasets and
Variables two members of
BuilderAppInstanceUI:
class BuilderAppInstanceUI : public QWidget
, public ObserverAdapter
{
Q_OBJECT
public:
BuilderAppInstanceUI(const Workflow &workflow);
~BuilderAppInstanceUI();
void retranslateUi(QWidget *Form);
void setupUi(QWidget *Form);
QStackedWidget *stackedWidget;
BuilderAppListWidget *Datasets;
QTreeWidget *Variables;
private slots:
void datasetChanged(QListWidgetItem* current, QListWidgetItem* previous);
};
BuilderAppListWidget inherits from
QListWidget and as such can emit this signal
SIGNAL(currentItemChanged(QListWidgetItem*,QListWi dgetItem*))
class BuilderAppListWidget : public QListWidget
{
Q_OBJECT
public:
BuilderAppListWidget (QWidget* qwdgt = nullptr);
~BuilderAppListWidget (){};
void dragEnterEvent( QDragEnterEvent * event ) ;
void dragMoveEvent( QDragMoveEvent * event ) ;
void dropEvent( QDropEvent * event );
void keyReleaseEvent( QKeyEvent * event ) final ;
private:
BuilderAppInstanceUI* m_instance ;
};
Should I declare explicitly
currentItemChanged in body for
BuilderAppListWidget class ? If not, where does problem come from ?
Regards