Ask / Submit

DialogHeader.extraContent read-only

asked 2018-12-21 16:36:24 +0200

Tanghus gravatar image

updated 2018-12-21 16:37:57 +0200

I was trying to find an easy way to show some info in at dialog, and stumbled over DialogHeader.extraContent, but it gives an error when running: Invalid property assignment: "extraContent" is a read-only property

Dialog {
id: timersDialog;
allowedOrientations: Orientation.Portrait | Orientation.Landscape;

DialogHeader {
    id: header;
    dialog: timersDialog
    title: "Title"
        Label {
            text: "Extra content"

What is the property exactly for then?

edit retag flag offensive close delete


Long shot but try with reserveExtraContent bool set to true

Allstar12345 ( 2018-12-21 18:10:55 +0200 )edit

Good suggestion, but nope

Tanghus ( 2018-12-21 19:26:33 +0200 )edit

In documentation of reserveExtraContent it says: "This property defaults to true if extraContent has one or more children; otherwise false." so perhaps you could try add a child item to it, instead of using it directly. I believe you can also make a subclass of it...

Edit: That's what @coderus said.

Direc ( 2018-12-23 12:19:47 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2018-12-23 00:49:56 +0200

coderus gravatar image

updated 2018-12-23 00:50:11 +0200

Label {
    parent: dialogHeader.extraContent
    text: "Extra content"
edit flag offensive delete publish link more


Interesting. I'll give that a try. It should be added to the docs.

Tanghus ( 2018-12-23 11:02:49 +0200 )edit
Login/Signup to Answer

Question tools

1 follower


Asked: 2018-12-21 16:36:24 +0200

Seen: 82 times

Last updated: Dec 23 '18