Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Chinese
  4. 如何在QTreeWidget中插入一行没有列限制的文字,或者一条可扩展的横线等等?

如何在QTreeWidget中插入一行没有列限制的文字,或者一条可扩展的横线等等?

Scheduled Pinned Locked Moved Unsolved Chinese
6 Posts 3 Posters 806 Views
  • 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.
  • D Offline
    D Offline
    deleted275
    wrote on last edited by
    #1

    如何在QTreeWidget中插入一行没有列限制的文字,或者一条可扩展的横线等等,如同合并一行中的所有列单元一样?
    如下图这样,头标题有2列,下面有一行“General Information----”,这种如何实现,求大神指教??
    b1dc717f-293b-4287-8627-06bd82ea4e21-image.png

    1 Reply Last reply
    0
    • lionelML Offline
      lionelML Offline
      lionelM
      wrote on last edited by
      #2

      这个要求一般是要自己自定义的

      D 1 Reply Last reply
      0
      • D Offline
        D Offline
        deleted275
        wrote on last edited by
        #3

        能解释地更详细点吗?苦恼,求帮助

        1 Reply Last reply
        0
        • lionelML lionelM

          这个要求一般是要自己自定义的

          D Offline
          D Offline
          deleted275
          wrote on last edited by
          #4

          @lionelM 能解释地更详细点吗?苦恼,求帮助

          1 Reply Last reply
          0
          • lionelML Offline
            lionelML Offline
            lionelM
            wrote on last edited by
            #5

            setColumnWidth()试试?你的图挂了,不太清楚具体情况

            1 Reply Last reply
            0
            • B Offline
              B Offline
              Bonnie
              wrote on last edited by Bonnie
              #6

              用 QTreeWidgetItem::setFirstColumnSpanned(true) 就可以第一列延伸整行了,不过图上的横线应该不是文字,你大概要另外想办法实现了

              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