Where does this code live? In main.cpp or somewhere else? Are you accidentally creating more than one instance of your server?w = new MainWindow();
zerbitzaria = new Server();
//Konexioak egiten dira zerbitzariarekin
qDebug () << QObject::connect(zerbitzaria, &Server::setSEtxekoPuntuakGora, w, &MainWindow::setMWEtxekoPuntuakGora);
Putting executable code in a qDebug() statement is a really bad idea, because you don't know what happens in release mode builds. The compiler could simply ignore the whole statement, and then you get no connect() call at all.
Call connect() and assign the result to a variable, then pass that variable to qDebug() for output.
Qt's "event loop" handles all signal / slot calls, all user interactions (key press, mouse click, etc.), and all events generated by the rest of Qt. In order for a Qt application to work, you have to allow control to return to the event loop so that Qt can process the events that have been added since the last time the event loop was executed.
If you write code that does extensive computation or otherwise ties up the program, then control can't return to the event loop, and signals and slots don't get handled. Look at the Qt documentation and read about the event loop.
Bookmarks