Choosing right context for property in viewport panel
Okay by looking at How to create a custom UI? I could figure it out
import bpy
from bpy.props import BoolProperty, PointerProperty
from bpy.types import PropertyGroup

class HelloWorldPanel(bpy.types.Panel):
    bl_label = &quot;Hello World Panel&quot;
    bl_idname = &quot;OBJECT_PT_hello&quot;
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_category = 'Tool'

    def draw(self, context):
        layout = self.layout
        row = layout.row()
        row.label(text=&quot;Hello world!&quot;, icon='WORLD_DATA')


class QuickRenameProperties(PropertyGroup):
    test_bool: BoolProperty(
        name = 'Test',
        description = 'Test description',
        default = True)


class QuickRename_PT_Panel(bpy.types.Panel):
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_label = &quot;Quick Rename&quot;
    bl_category = &quot;Tool&quot;
    bl_parent_id = &quot;OBJECT_PT_hello&quot;

    def draw(self, context):
        layout = self.layout
        layout.use_property_split = True
        layout.use_property_decorate = False
        scene = context.scene
        mytool = scene.my_tool

        row = layout.row()
        row.prop(mytool, 'test_bool')


def register():
    bpy.utils.register_class(HelloWorldPanel)
    bpy.utils.register_class(QuickRename_PT_Panel)
    bpy.utils.register_class(QuickRenameProperties)
    bpy.types.Scene.my_tool = PointerProperty(type = QuickRenameProperties)

def unregister():
    bpy.utils.unregister_class(QuickRename_PT_Panel)
    bpy.utils.unregister_class(HelloWorldPanel)
    del bpy.types.Scene.my_tool


if __name__ == &quot;__main__&quot;:
    register()