connect(but, SIGNAL(clicked()), newWindow());
C++ (Qt)connect(but, &QPushButton::clicked, []() {newWindow();});
C++ (Qt)connect(but, &QPushButton::clicked, newWindow);
C++ (Qt)connect(but, &QPushButton::clicked, []() { newWindow(i); });
C++ (Qt)connect(but, &QPushButton::clicked, [&]() { newWindow(i); });
C++ (Qt)connect(but, &QPushButton::clicked, [=]() { newWindow(i); });