I am using external slot to change line edit value, after connecting this slot and run my application it crash.
I am runing in this issuse from the last 4 days, I try many thinks but it doesn't work to me.
I have tow classes, one for GUI, and one for changing widget values and other things:
getdata class:
Qt Code:
  1. #ifndef GETDATA_H
  2. #define GETDATA_H
  3.  
  4. #include <QObject>
  5.  
  6. #include "store.h"
  7.  
  8. class QString;
  9.  
  10. class GetData : public QObject, private Ui::Store
  11. {
  12. Q_OBJECT
  13. public:
  14. GetData();
  15.  
  16. private slots:
  17. void setItemCountity();
  18. };
  19.  
  20. #endif // GETDATA_H[/QTCLASS]
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. #include <QString>
  2.  
  3. #include "getdata.h"
  4.  
  5. GetData::GetData() : Ui::Store()
  6. {
  7.  
  8. }
  9.  
  10. void GetData::setItemCountity()
  11. {
  12. addressWholesaleAdd->setText("dddddddd");
  13. }
To copy to clipboard, switch view to plain text mode 

store class:
Qt Code:
  1. #ifndef STORE_H
  2. #define STORE_H
  3.  
  4. #include <QMainWindow>
  5.  
  6. #include "ui_store.h"
  7.  
  8. class Store : public QMainWindow
  9. {
  10. Q_OBJECT
  11. public:
  12. Store(QWidget *parent = 0);
  13.  
  14. private:
  15. Ui::Store ui;
  16.  
  17. private slots:
  18. };
  19.  
  20. #endif // STORE_H
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. #include "store.h"
  2. #include "getdata.h"
  3.  
  4. Store::Store(QWidget *parent) : QMainWindow(parent)
  5. {
  6. ui.setupUi(this);
  7.  
  8. .
  9. .
  10. .
  11.  
  12. GetData *dd = new GetData;
  13.  
  14. connect(ui.addWholesaleAdd, SIGNAL(clicked()), dd, SLOT(setItemCountity()));
  15. }
To copy to clipboard, switch view to plain text mode