Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Chinese
  4. QML 中Component.onCompleted到底在什么时候起作用啊。
Qt 6.11 is out! See what's new in the release blog

QML 中Component.onCompleted到底在什么时候起作用啊。

Scheduled Pinned Locked Moved Chinese
2 Posts 2 Posters 6.3k 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.
  • C Offline
    C Offline
    cokefish
    wrote on last edited by
    #1

    QML 中Component.onCompleted到底在什么时候起作用啊。
    我在一个qml文件中,
    在这个文件的Component.onCompleted中动态生成ListModel,
    可是这个文件的GridView无法在进入文件后立即显示ListModel的数据啊?
    是不是Component.onCompleted的时间不对啊(不是在进入这个文件后的最后的操作啊)

    1 Reply Last reply
    0
    • D Offline
      D Offline
      deleted487
      wrote on last edited by
      #2

      贴代码吧,不要在这里,可以放在gist.github.com之类的地方

      print一下log,检查一下逻辑不可以么?

      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