Is "Scene" derived from QWidget? Is it a widget you have added to MainWindow using Qt Designer, and you have named it "widget"? If both of these are true, then the problem might be because you defined your slot / signal pair to use "const int &" as an argument, but your connect statement just says "int".