Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Chinese
  4. 我在GUI窗口上添加了一个进度条,我想创建一个线程,在这个线程里能否控制GUI窗口的进度条的位置属性吗?通过在线程中定义mainwindow *aa指针能否控制呢?
Forum Updated to NodeBB v4.3 + New Features

我在GUI窗口上添加了一个进度条,我想创建一个线程,在这个线程里能否控制GUI窗口的进度条的位置属性吗?通过在线程中定义mainwindow *aa指针能否控制呢?

Scheduled Pinned Locked Moved Chinese
3 Posts 3 Posters 3.0k 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.
  • 7611534547 Offline
    7611534547 Offline
    761153454
    wrote on last edited by
    #1

    我在GUI窗口上添加了一个进度条,我想创建一个线程,在这个线程里能否控制GUI窗口的进度条的位置属性吗?通过在线程中定义mainwindow *aa指针能否控制呢?

    Qt中国群 :218967017、218967042
    python中国群:133067664

    1 Reply Last reply
    0
    • G Offline
      G Offline
      Gateslu
      wrote on last edited by
      #2

      可以通过信号和槽的机制,在线程中发送当前进度信号,然后在主界面中更新进度条

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jiangcaiyang
        wrote on last edited by
        #3

        可以的,使用信号和槽,因为当两个对象处于不同的线程时,它们采用的连接时异步的。详情请见:http://www.cnblogs.com/hicjiajia/archive/2011/02/03/1948943.html

        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