This is probably too late to answer but as I am also a beginner and struggled a lot to figure out this, I would like to share a solution that worked for me and according to me this is one of the simplest solution out there for a beginner.
Follow this link. It's possible that in the future that link might not exists, hence I am writing down a detailed version, as detailed as possible because I think for an absolute beginner (like myself) it can be very useful.
- Default mainwindow.cpp

- Go to "mainwindow.ui" (or whatever .ui one has)

- Right-click outside the window and activate "Action Editor" if it wasn't already activated:

- Right-click on the window and create "Menu-bar" and then double-clicking on "type here" you can rename it as "Open" or something which will then drop-down another box where you can again type the name you desire, let's say "message".



- When created menu item "message" is created corresponding item will apear in the "Action Editor"

- Right-click on the "message" in the Action Editor and click "go to slot" which will lead you to the specific slot in the mainwindow.cpp:


- Here you can create a small window with whatever message you want to display.
[![Window creating code]11 etc goes here.]12

****don't forget to include "QTextEditor", go to mainwindow.h and #include "

On compiling & executing we will see :
