Where is the implementation of class serversocket? Is it in a separate library? Is it part of the project?

If i declare this function as "No Static" I get other error in other form named as logform
Yes, you do. To access a public member variable of function you need an instance of MainWindow (pointer, reference or actual instance). Perhaps you should pass one as a parameter to the other form. This is basic C++ knowledge and nothing to do with Qt.