How to create and name a slot in a different class than MainWindow?

I am currently using QT Creator, which created a UI file for viewing, and I am starting QT.

There is a part, I wonder how I can create another class for, say, GraphicView, so that I can send a signal and slot to this class instead of the main form?

Side question: why can't I edit Singal and Slot elsewhere than MainWindow in signal / slot editing mode? (the edit button is not activated if it is not MainWindow, so I should use this signal by default). Let's say I need to create ToggleFullScreen (), but the editing is gray, how do I do this?

+3
source share
2 answers
  • , QMainWindow, .
+2

Source: https://habr.com/ru/post/1732058/


All Articles