The signal slot connection has failed since table->selectionModel() has returned null.
If you set the model for your table before making signal slot connection, table->selectionModel() will return a valid model, making the signal slot connection successful.