Function move/resize of titlebar

I would like to know how KDE developers get it move/resize window on Konsole or Kate application. In these applications, there is the title bar and there is also another bar where you can select main toolbar and session toolbar.

These bars are shown in the image.

I want to know how to get it or create these bars to add them in my own app so I can get the same functions, exactly moving and resizing. I want this but only with the clicked mouse and drag.

To clarify, I show this image:

In the last image we can see the Konsole app without a title bar but we can see the toolbar. In this bar there is the move function if I click with left mouse button and drag the mouse. This is my goal in my own bar.

A relevant function was added to Qt here

You might want to start from there.
From the explanation, it might be using some XCB stuff when on Linux.

I don’t think there would have been a need for a separate function by KDE Frameworks for this, but you can consider this to be an option if you are developing with Qt

I just answered on your other thread about the exact same request:

I am not sure if the forums here have a policy on duplicated threads from the same author in a very short-period of time (I am new around here).

But my experience, in other forums, is that such behavior ends up leading to fewer people willing to help you.

Best of luck on your task.

By the way, the right-click works on the menu-bar as it uses a Qt standard component under the hood.

There is no KDE specific hidden code. You can choose to implement your application based on a UI toolkit (Qt, GTK, etc…) that already provides the features you need, or, as I suggested on the other thread, you can as Godot to expose such feature to their scripting language.

If you believe the toolkit you are using has enough features to implement this, I believe you will find more solutions on their own support resources (forums, etc.)

There is no KDE specific, nor hidden feature, to help you achieve such feature.