Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-128792

Questions (Bugs) - qmllint / ApplicationWindow / Screen

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.7.2
    • None
    • All

    Description

      I am not sure if I miss something or if there are some bugs.
      We are using an ApplicationWindow with some scripting:

      ApplicationWindow {
      	id: root
      	[...]
      	function test {
      		[...]
      		... root.screen.height ...
      		[...]
      		... (root.screen as Screen).height ...
      		[...]
      	}
      }
      

      1. We are using `root.screen` because `Screen` (attached property) will only provide the primary screen and not the screen where the application is living. Is this intentional?

      2. Using `root.screen.height` leads to a qml lint warning because it is a `variant`:

      Warning: App.qml: Member "height" not found on type "QObject" [missing-property]
      			... root.screen.height  ...
                                             	^^^^^^
      

      3. Using `(root.screen as Screen).height` leads to a qml lint warning:

      Warning: App.qml: Member "height" not found on type "QQuickScreen" [missing-property]
      			... (root.screen as Screen).height  ...
                                             	            ^^^^^^
      

      So it would be good to know how to solve the lint issue.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              larss Lars Schmertmann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes