Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Qt transition 5.9 to 5.13 issues
Qt 6.11 is out! See what's new in the release blog

Qt transition 5.9 to 5.13 issues

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 447 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    PSI_lbc
    wrote on last edited by
    #1

    Problem 1) Virtually every control on any QML form in all my projects gets the following error:

    QML Button: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.

    The "errors" did not exist in 5.9 versions and before.
    The "errors" don't appear to affect app operation.

    I've tried the simple solution of commenting out the "anchors.??: something" lines and do not get the errors.

    The "anchors." statements are used to enforce control placement on forms. Not unexpectedly, when the "anchors." statements are not used, the forms look like shit.

    Please do not suggest I learn to use "Layouts". Layouts do not work for me. At least I've never been able to get them to work as I wanted.

    While I don't know if the messages will cause problems on released apps, I'd prefer not to find that out after uploading to the app stores.

    How do I disable the error message?

    Problem 2) The TableView QML Type no longer works the same as in 5.9 and before.

    When running the app with no code changes, the TableView loads as expected, but when you "flick" to scroll, the new improved 5.13 version does not scroll in the same fashion. It's like there were changes made to the "flick" speed or animation or IDK.

    With 5.9 and prior, you'd flick the TableView and the list would scroll nicely and gradually come to a stop. Now you flick and the list scrolls 3 or 4 rows and then jerks to a halt.

    Actually I just fixed this. 5.9 and prior didn't care if the verticalScrollBarPolicy was set. Apparently 5.13 does. I noticed this because when NOT defined on 5.13 Android there would actually be a scroll grab handle..but is was sooooo tiny as to be almost be invisible. If not defined, 5.9 and prior left the vertical scroll handle off if the platform was iOS or Android and added it as required on the desktop versions..go figure.

        verticalScrollBarPolicy: (gd.isDeviceDesktop()===true) ? Qt.ScrollBarAlwaysOn : Qt.ScrollBarAlwaysOff
    

    The above line setting verticalScrollBarPolicy fixes Problem 2

    Problem 3) The model loaded in the TableView thinks it has a negative list count. The app displays the following output after loading the model. This doesn't appear to hurt anything, but it would be nice to disable the output

    W/TheAppName( 8025): Model size of -617 is less than 0

    Any suggestions would be appreciated.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved