Skip to content

window.Hide() destroys the window? #166

Open
@akamensky

Description

@akamensky

I am really confused about window.Hide()

I am trying to achieve the sort of application where no window does not mean app must exit. It still must run in the background. However when I try to call window.Hide() which suppose to only hide it but not destroy seems that it actually gets destroyed. What I tried:

struct that I use as common object in qml and go code. In this struct I set Window *qml.Window. Window has Close button (standard controls are hidden through Qt.FramelessWindowHint). Upon clicking Close button from go code I call window.Hide(). This seem to work fine and window is supposedly hidden (the reference to object still exists!). But when I try to call window.Show() -- nothing happens.

I am not sure whether this is the right way to achieve what I want, but I don't want to rebuild window every time. Moreover it seems to be impossible to build window from non-main goroutine... Though I am not sure what is the reason behind this one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions