Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. how to call Mainwindow method from a childwindow.cpp
Forum Updated to NodeBB v4.3 + New Features

how to call Mainwindow method from a childwindow.cpp

Scheduled Pinned Locked Moved Solved General and Desktop
16 Posts 2 Posters 2.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M moyin

    i tried placing connect function in both the constructors separately but there is no effect, here is my sample code.

    MainWindow.h

    #ifndef MAINWINDOW_H
    #define MAINWINDOW_H

    #include <QMainWindow>
    #include <create_config.h>
    #include <QTableView>
    #include <QStandardItemModel>
    #include "JailHouseCell.h"
    #include "JailHouseCellList.h"
    #include "import.h"

    namespace Ui {
    class MainWindow;
    }

    class MainWindow : public QMainWindow
    {
    Q_OBJECT

    public:
    explicit MainWindow(QWidget *parent = 0);
    void get_cell_data(JailHouseCellList &jlist) ;
    void get_mem_data (JailHouseCell &j) ;
    void get_pci_data (JailHouseCell &j) ;
    void get_irq_data (JailHouseCell &j) ;

    ~MainWindow();
    

    private slots:
    void on_pushButton_Create_Config_clicked();

    void on_pushButton_6_clicked();
    
    void on_pushButton_Mem_Config_Add_clicked();
    
    void on_pushButton_Mem_config_Delete_clicked();
    
    void on_pushButton_IRQ_Chips_Add_clicked();
    
    void on_pushButton_IRQ_Chips_Delete_clicked();
    
    void on_pushButton_PCI_Devices_Add_clicked();
    
    void on_pushButton_PCI_Devices_Delete_clicked();
    
    void on_pushButton_Bootfile_clicked();
    
    void on_lineEdit_HM_size_editingFinished();
    

    // void on_lineEdit_HM_size_returnPressed();

    void on_lineEdit_Size_DC_editingFinished();
    

    // void on_lineEdit_Size_DC_returnPressed();

    void on_pushButton_View_Configuration_clicked();
    
    void on_pushButton_Create_clicked();
    

    // void on_lineEdit_NO_CELLS_editingFinished();

    void on_comboBox_CellList_activated(QString index);
    
    void on_pushButton_Update_clicked();
    
    void on_pushButton_Destroy_clicked();
    
    void on_lineEdit_NO_CELLS_textChanged(const QString &arg1) ;
    
    
    void on_pushButton_GenerateConfigFile_clicked();
    
    void on_lineEdit_HM_size_textChanged(const QString &arg1);
    
    void on_pushButton_import_clicked();
    void slot_load_cell_dropdownlist();
    

    private:
    Create_Config *cc ;
    Ui::MainWindow *ui;
    Import *imp ;
    QTableView *view = new QTableView;
    // QStandardItemModel *model; = new QStandardItemModel(25,5,this); //
    JailHouseCell create_cell () ;
    RootCell create_root_cell() ;
    void add_mem(JailHouseCell &j) ;
    void add_irq(JailHouseCell &j) ;
    void add_pci(JailHouseCell &j) ;
    void load_cell(int index) ;
    void load_cell(std::string) ;
    void load_mem(JailHouseCell &j) ;
    void load_irq(JailHouseCell &j) ;
    void load_pci(JailHouseCell &j) ;
    void Enable_Root_Tabs() ;
    void Disable_Root_Tabs() ;
    void Enable_LS_Buttons() ;
    void Disable_LS_Buttons() ;
    void clear_cpu_config() ;
    void load_cell_dropdownlist () ;
    void load_cell_dropdownlist (std::string) ;
    void add_Hypervisor_Memory(RootCell &r);
    void add_Debug_Console(RootCell &r) ;
    void add_Platform_Info(RootCell &r) ;
    void load_Hypervisor_Memory(RootCell &r) ;
    void load_Debug_Console(RootCell &r) ;
    void load_Platform_Info(RootCell &r) ;

    };

    #endif // MAINWINDOW_H

    MainWindow.cpp (constructor)

    MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
    {

    ui->setupUi(this);
    QFont font("Plastique",10);
    

    // font.setStyleHint(QFont::Monospace);
    QApplication::setFont(font);
    ui->tabWidget_Main->setHidden(true);

    ui->tabWidget_CELL_CONFIG->setHidden(true);
    ui->tableWidget_cell_config_2->setColumnWidth(4,250);
    Disable_Root_Tabs();
    Disable_LS_Buttons();
    

    // Import *temp = new Import() ;
    // connect(temp, SIGNAL(after_import()),this, SLOT(slot_load_cell_dropdownlist()));

    }

    Import.h (child window)
    #ifndef IMPORT_H
    #define IMPORT_H

    #include <QDialog>

    namespace Ui {
    class Import;
    }

    class Import : public QDialog
    {
    Q_OBJECT

    public:
    explicit Import(QWidget *parent = 0);
    ~Import();

    private slots:
    void on_pushButton_import_config_clicked();

    void on_pushButton_import_dump_clicked();
    
    void on_pushButton_create_imported_config_clicked();
    

    signals:
    void after_import();

    private:
    Ui::Import *ui;
    };

    #endif // IMPORT_H

    import.cpp (child window)

    #include "import.h"
    #include "ui_import.h"
    #include <QFileDialog>
    #include <QMessageBox>
    #include "JailHouseCellList.h"
    #include "readfromdump/ReadDmp.h"
    #include "mainwindow.h"
    #include <iostream>

    Import::Import(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::Import)
    {
    ui->setupUi(this);
    MainWindow *temp = new MainWindow() ;
    connect(this, SIGNAL(after_import()),temp, SLOT(slot_load_cell_dropdownlist()));

    }

    Import::~Import()
    {
    delete ui;
    }

    void Import::on_pushButton_import_config_clicked()
    {
    QString filepath = QFileDialog::getOpenFileName(this, tr("Import file"), "/home","Config_Files(*.info)") ;
    ui->lineEdit_config_File->setText(filepath);
    }

    void Import::on_pushButton_import_dump_clicked()
    {
    QString filepath = QFileDialog::getOpenFileName(this, tr("Import file"), "/home","Dump_Files(*.dmp)") ;
    ui->lineEdit_Dump_File->setText(filepath);
    }

    void Import::on_pushButton_create_imported_config_clicked()
    {
    try{
    std::string info_file = ui->lineEdit_config_File->text().toStdString() ;
    std::string dump_file = ui->lineEdit_Dump_File->text().toStdString() ;
    JailHouseCellList & JL = JailHouseCellList::getJailHouseCellList();
    ReadDmp jt(info_file,dump_file);
    JailHouseCell * jc = jt.get_cell();
    if( RootCell * j = dynamic_cast<RootCell * >(jc) )
    JL.add_rootcell_no_validation(*j);
    else
    JL.add_cell_no_validation(*jc);
    }
    catch(JailHouseCell_error & e)
    {
    std::string s = e.what();
    QMessageBox::warning(this,"Wrong input",e.what()) ;
    }
    catch(std::exception & e)
    {
    std::string s = e.what();
    QMessageBox::warning(this,"Wrong input",e.what()) ;
    }
    catch(...)
    {
    QMessageBox::warning(this,"unknownerror","unknownerror");
    }
    emit after_import();

    }

    //void Import::after_import() {
    // std::cout << "calling load_dropdownList() function" << std::endl ;
    //}

    Pls help me into this

    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #2

    @moyin said in how to call Mainwindow method from a childwindow.cpp:

    MainWindow *temp = new MainWindow() ;

    Why do you create a new MainWindow instance in Import constructor?!

    You should connect signals/slots in MainWindow where you create Import instance.
    This is completely wrong as you create a new Import instance:

    // Import *temp = new Import() ;
    // connect(temp, SIGNAL(after_import()),this, SLOT(slot_load_cell_dropdownlist()));
    

    It should be

    imp = new Import() ;
    connect(imp, SIGNAL(after_import()),this, SLOT(slot_load_cell_dropdownlist()));
    

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    1
    • M Offline
      M Offline
      moyin
      wrote on last edited by
      #3

      @jsulm thnks for reply,

      I tried your sugesstion, but it does't resolve my issue.
      while debugging into emit after_import() , i found this below lines of code can u just clear me what does it mean.

      // SIGNAL 0
      void Import::after_import()
      {
      QMetaObject::activate(this, &staticMetaObject, 0, 0);
      }
      QT_END_MOC_NAMESPACE

      jsulmJ 1 Reply Last reply
      0
      • M moyin

        @jsulm thnks for reply,

        I tried your sugesstion, but it does't resolve my issue.
        while debugging into emit after_import() , i found this below lines of code can u just clear me what does it mean.

        // SIGNAL 0
        void Import::after_import()
        {
        QMetaObject::activate(this, &staticMetaObject, 0, 0);
        }
        QT_END_MOC_NAMESPACE

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #4

        @moyin Your problem is for sure not in this code. Either the signal is not emitted, or not connected to slot, or (like I suggested before) you actually use the wrong Import instance (as you create a new temporary instance which you connect then)...
        Can you show your code after applying my suggestion?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        M 1 Reply Last reply
        0
        • jsulmJ jsulm

          @moyin Your problem is for sure not in this code. Either the signal is not emitted, or not connected to slot, or (like I suggested before) you actually use the wrong Import instance (as you create a new temporary instance which you connect then)...
          Can you show your code after applying my suggestion?

          M Offline
          M Offline
          moyin
          wrote on last edited by
          #5

          @jsulm thnks for rply,
          this is my mainwindow.cpp (constructor)

          MainWindow::MainWindow(QWidget *parent) :
          QMainWindow(parent),
          ui(new Ui::MainWindow)
          {

          ui->setupUi(this);
          QFont font("Plastique",10);
          

          // font.setStyleHint(QFont::Monospace);
          QApplication::setFont(font);
          ui->tabWidget_Main->setHidden(true);

          ui->tabWidget_CELL_CONFIG->setHidden(true);
          ui->tableWidget_cell_config_2->setColumnWidth(4,250);
          Disable_Root_Tabs();
          Disable_LS_Buttons();
          

          // Import *temp = new Import() ;
          // connect(temp, SIGNAL(after_import()),this, SLOT(slot_load_cell_dropdownlist()));
          imp = new Import() ;
          connect(imp, SIGNAL(after_import()),this, SLOT(slot_load_cell_dropdownlist()));

          }

          M 1 Reply Last reply
          0
          • M moyin

            @jsulm thnks for rply,
            this is my mainwindow.cpp (constructor)

            MainWindow::MainWindow(QWidget *parent) :
            QMainWindow(parent),
            ui(new Ui::MainWindow)
            {

            ui->setupUi(this);
            QFont font("Plastique",10);
            

            // font.setStyleHint(QFont::Monospace);
            QApplication::setFont(font);
            ui->tabWidget_Main->setHidden(true);

            ui->tabWidget_CELL_CONFIG->setHidden(true);
            ui->tableWidget_cell_config_2->setColumnWidth(4,250);
            Disable_Root_Tabs();
            Disable_LS_Buttons();
            

            // Import *temp = new Import() ;
            // connect(temp, SIGNAL(after_import()),this, SLOT(slot_load_cell_dropdownlist()));
            imp = new Import() ;
            connect(imp, SIGNAL(after_import()),this, SLOT(slot_load_cell_dropdownlist()));

            }

            M Offline
            M Offline
            moyin
            wrote on last edited by
            #6

            @moyin said in how to call Mainwindow method from a childwindow.cpp:

            @jsulm thnks for rply,
            this is my mainwindow.cpp (constructor)

            MainWindow::MainWindow(QWidget *parent) :
            QMainWindow(parent),
            ui(new Ui::MainWindow)
            {

            ui->setupUi(this);
            QFont font("Plastique",10);
            

            // font.setStyleHint(QFont::Monospace);
            QApplication::setFont(font);
            ui->tabWidget_Main->setHidden(true);

            ui->tabWidget_CELL_CONFIG->setHidden(true);
            ui->tableWidget_cell_config_2->setColumnWidth(4,250);
            Disable_Root_Tabs();
            Disable_LS_Buttons();
            

            // Import *temp = new Import() ;
            // connect(temp, SIGNAL(after_import()),this, SLOT(slot_load_cell_dropdownlist()));
            imp = new Import() ;
            connect(imp, SIGNAL(after_import()),this, SLOT(slot_load_cell_dropdownlist()));

            }

            this is my import.cpp where i'm emitting signal.

            #include "import.h"
            #include "ui_import.h"
            #include <QFileDialog>
            #include <QMessageBox>
            #include "JailHouseCellList.h"
            #include "readfromdump/ReadDmp.h"
            #include "mainwindow.h"
            #include <iostream>

            Import::Import(QWidget *parent) :
            QDialog(parent),
            ui(new Ui::Import)
            {
            ui->setupUi(this);
            QFont font("Plastique",10);
            // font.setStyleHint(QFont::Monospace);
            QApplication::setFont(font);

            }

            Import::~Import()
            {
            delete ui;
            }

            void Import::on_pushButton_import_config_clicked()
            {
            QString filepath = QFileDialog::getOpenFileName(this, tr("Import file"), "/home","Config_Files(*.info)") ;
            ui->lineEdit_config_File->setText(filepath);
            }

            void Import::on_pushButton_import_dump_clicked()
            {
            QString filepath = QFileDialog::getOpenFileName(this, tr("Import file"), "/home","Dump_Files(*.dmp)") ;
            ui->lineEdit_Dump_File->setText(filepath);
            }

            void Import::on_pushButton_create_imported_config_clicked()
            {
            try{
            std::string info_file = ui->lineEdit_config_File->text().toStdString() ;
            std::string dump_file = ui->lineEdit_Dump_File->text().toStdString() ;
            JailHouseCellList & JL = JailHouseCellList::getJailHouseCellList();
            ReadDmp jt(info_file,dump_file);
            JailHouseCell * jc = jt.get_cell();
            if( RootCell * j = dynamic_cast<RootCell * >(jc) )
            JL.add_rootcell_no_validation(*j);
            else
            JL.add_cell_no_validation(*jc);
            }
            catch(JailHouseCell_error & e)
            {
            std::string s = e.what();
            QMessageBox::warning(this,"Wrong input",e.what()) ;
            }
            catch(std::exception & e)
            {
            std::string s = e.what();
            QMessageBox::warning(this,"Wrong input",e.what()) ;
            }
            catch(...)
            {
            QMessageBox::warning(this,"unknownerror","unknownerror");
            }
            emit after_import();

            }

            //void Import::after_import() {
            // std::cout << "calling load_dropdownList() function" << std::endl ;
            //}

            jsulmJ 1 Reply Last reply
            0
            • M moyin

              @moyin said in how to call Mainwindow method from a childwindow.cpp:

              @jsulm thnks for rply,
              this is my mainwindow.cpp (constructor)

              MainWindow::MainWindow(QWidget *parent) :
              QMainWindow(parent),
              ui(new Ui::MainWindow)
              {

              ui->setupUi(this);
              QFont font("Plastique",10);
              

              // font.setStyleHint(QFont::Monospace);
              QApplication::setFont(font);
              ui->tabWidget_Main->setHidden(true);

              ui->tabWidget_CELL_CONFIG->setHidden(true);
              ui->tableWidget_cell_config_2->setColumnWidth(4,250);
              Disable_Root_Tabs();
              Disable_LS_Buttons();
              

              // Import *temp = new Import() ;
              // connect(temp, SIGNAL(after_import()),this, SLOT(slot_load_cell_dropdownlist()));
              imp = new Import() ;
              connect(imp, SIGNAL(after_import()),this, SLOT(slot_load_cell_dropdownlist()));

              }

              this is my import.cpp where i'm emitting signal.

              #include "import.h"
              #include "ui_import.h"
              #include <QFileDialog>
              #include <QMessageBox>
              #include "JailHouseCellList.h"
              #include "readfromdump/ReadDmp.h"
              #include "mainwindow.h"
              #include <iostream>

              Import::Import(QWidget *parent) :
              QDialog(parent),
              ui(new Ui::Import)
              {
              ui->setupUi(this);
              QFont font("Plastique",10);
              // font.setStyleHint(QFont::Monospace);
              QApplication::setFont(font);

              }

              Import::~Import()
              {
              delete ui;
              }

              void Import::on_pushButton_import_config_clicked()
              {
              QString filepath = QFileDialog::getOpenFileName(this, tr("Import file"), "/home","Config_Files(*.info)") ;
              ui->lineEdit_config_File->setText(filepath);
              }

              void Import::on_pushButton_import_dump_clicked()
              {
              QString filepath = QFileDialog::getOpenFileName(this, tr("Import file"), "/home","Dump_Files(*.dmp)") ;
              ui->lineEdit_Dump_File->setText(filepath);
              }

              void Import::on_pushButton_create_imported_config_clicked()
              {
              try{
              std::string info_file = ui->lineEdit_config_File->text().toStdString() ;
              std::string dump_file = ui->lineEdit_Dump_File->text().toStdString() ;
              JailHouseCellList & JL = JailHouseCellList::getJailHouseCellList();
              ReadDmp jt(info_file,dump_file);
              JailHouseCell * jc = jt.get_cell();
              if( RootCell * j = dynamic_cast<RootCell * >(jc) )
              JL.add_rootcell_no_validation(*j);
              else
              JL.add_cell_no_validation(*jc);
              }
              catch(JailHouseCell_error & e)
              {
              std::string s = e.what();
              QMessageBox::warning(this,"Wrong input",e.what()) ;
              }
              catch(std::exception & e)
              {
              std::string s = e.what();
              QMessageBox::warning(this,"Wrong input",e.what()) ;
              }
              catch(...)
              {
              QMessageBox::warning(this,"unknownerror","unknownerror");
              }
              emit after_import();

              }

              //void Import::after_import() {
              // std::cout << "calling load_dropdownList() function" << std::endl ;
              //}

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #7

              @moyin Are you sure signal is emitted?

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              M 1 Reply Last reply
              0
              • jsulmJ jsulm

                @moyin Are you sure signal is emitted?

                M Offline
                M Offline
                moyin
                wrote on last edited by
                #8

                @jsulm thanks for rply,
                i dont how to confirm the signal is emitted or not but when i run the application in debug mode and step into emit after_import(); it takes me into this code snippet. that i already shared you.

                / SIGNAL 0
                void Import::after_import()
                {
                QMetaObject::activate(this, &staticMetaObject, 0, 0);
                }
                QT_END_MOC_NAMESPACE

                jsulmJ 1 Reply Last reply
                0
                • M moyin

                  @jsulm thanks for rply,
                  i dont how to confirm the signal is emitted or not but when i run the application in debug mode and step into emit after_import(); it takes me into this code snippet. that i already shared you.

                  / SIGNAL 0
                  void Import::after_import()
                  {
                  QMetaObject::activate(this, &staticMetaObject, 0, 0);
                  }
                  QT_END_MOC_NAMESPACE

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #9

                  @moyin You can just put a breakpoint in your slot. Or when you're in that code block then just go further (step) to see what is happening.
                  Also do

                  qDebug() << connect(imp, SIGNAL(after_import()),this, SLOT(slot_load_cell_dropdownlist()));
                  

                  to see whether the connection was actually successful.

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    moyin
                    wrote on last edited by
                    #10

                    @jsulm , yes! that is
                    qDebug() << connect(imp, SIGNAL(after_import()),this, SLOT(slot_load_cell_dropdownlist()));
                    returning true.

                    And if i put BreakPoint in slot_load_cell_dropdownlist(). debugger not reaching to that BreakPoint.

                    jsulmJ 1 Reply Last reply
                    0
                    • M moyin

                      @jsulm , yes! that is
                      qDebug() << connect(imp, SIGNAL(after_import()),this, SLOT(slot_load_cell_dropdownlist()));
                      returning true.

                      And if i put BreakPoint in slot_load_cell_dropdownlist(). debugger not reaching to that BreakPoint.

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #11

                      @moyin Do you by any chance have more than one Import instance?
                      And what are you doing in slot_load_cell_dropdownlist()?

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      M 1 Reply Last reply
                      0
                      • jsulmJ jsulm

                        @moyin Do you by any chance have more than one Import instance?
                        And what are you doing in slot_load_cell_dropdownlist()?

                        M Offline
                        M Offline
                        moyin
                        wrote on last edited by
                        #12

                        @jsulm
                        @ Do you by any chance have more than one Import instance?
                        YES!
                        Actually i have 2 import instance to the same pointer (imp) .

                        @what are you doing in slot_load_cell_dropdownlist()?
                        i am just reinitialising a Qcombobox.

                        jsulmJ 1 Reply Last reply
                        0
                        • M moyin

                          @jsulm
                          @ Do you by any chance have more than one Import instance?
                          YES!
                          Actually i have 2 import instance to the same pointer (imp) .

                          @what are you doing in slot_load_cell_dropdownlist()?
                          i am just reinitialising a Qcombobox.

                          jsulmJ Offline
                          jsulmJ Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on last edited by
                          #13

                          @moyin said in how to call Mainwindow method from a childwindow.cpp:

                          Actually i have 2 import instance to the same pointer (imp) .

                          What?! Why? Then the first one is lost as you overwrite the pointer when you create the second instance. And which of them did you actually connected?

                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                          M 1 Reply Last reply
                          1
                          • jsulmJ jsulm

                            @moyin said in how to call Mainwindow method from a childwindow.cpp:

                            Actually i have 2 import instance to the same pointer (imp) .

                            What?! Why? Then the first one is lost as you overwrite the pointer when you create the second instance. And which of them did you actually connected?

                            M Offline
                            M Offline
                            moyin
                            wrote on last edited by
                            #14

                            @jsulm Now i changed my code like,

                            MainWindow::MainWindow(QWidget *parent) :
                            QMainWindow(parent),
                            ui(new Ui::MainWindow)
                            {

                            ui->setupUi(this);
                            QFont font("Plastique",10);
                            

                            // font.setStyleHint(QFont::Monospace);
                            QApplication::setFont(font);
                            ui->tabWidget_Main->setHidden(true);

                            ui->tabWidget_CELL_CONFIG->setHidden(true);
                            ui->tableWidget_cell_config_2->setColumnWidth(4,250);
                            Disable_Root_Tabs();
                            Disable_LS_Buttons();
                            

                            // Import *temp = new Import() ;
                            // connect(temp, SIGNAL(after_import()),this, SLOT(slot_load_cell_dropdownlist()));
                            imp2 = new Import(this) ;
                            std::cout << "just before connect" << std::endl;
                            qDebug() << connect(imp2, SIGNAL(after_import()),this, SLOT(slot_load_cell_dropdownlist()));
                            std::cout << "just after connect" << std::endl;
                            }

                            M 1 Reply Last reply
                            0
                            • M moyin

                              @jsulm Now i changed my code like,

                              MainWindow::MainWindow(QWidget *parent) :
                              QMainWindow(parent),
                              ui(new Ui::MainWindow)
                              {

                              ui->setupUi(this);
                              QFont font("Plastique",10);
                              

                              // font.setStyleHint(QFont::Monospace);
                              QApplication::setFont(font);
                              ui->tabWidget_Main->setHidden(true);

                              ui->tabWidget_CELL_CONFIG->setHidden(true);
                              ui->tableWidget_cell_config_2->setColumnWidth(4,250);
                              Disable_Root_Tabs();
                              Disable_LS_Buttons();
                              

                              // Import *temp = new Import() ;
                              // connect(temp, SIGNAL(after_import()),this, SLOT(slot_load_cell_dropdownlist()));
                              imp2 = new Import(this) ;
                              std::cout << "just before connect" << std::endl;
                              qDebug() << connect(imp2, SIGNAL(after_import()),this, SLOT(slot_load_cell_dropdownlist()));
                              std::cout << "just after connect" << std::endl;
                              }

                              M Offline
                              M Offline
                              moyin
                              wrote on last edited by
                              #15

                              @jsulm
                              Same result it is not calling slot_load_cell_dropdownlist() at all.

                              M 1 Reply Last reply
                              0
                              • M moyin

                                @jsulm
                                Same result it is not calling slot_load_cell_dropdownlist() at all.

                                M Offline
                                M Offline
                                moyin
                                wrote on last edited by
                                #16

                                yeah! man its working thanks alot.

                                1 Reply Last reply
                                0

                                • Login

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • Users
                                • Groups
                                • Search
                                • Get Qt Extensions
                                • Unsolved