Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to insert QProgressBar in QTableWidget cell
QtWS25 Last Chance

How to insert QProgressBar in QTableWidget cell

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 9.9k 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.
  • A Offline
    A Offline
    adnan
    wrote on last edited by
    #1

    I want to display progress bar in QTableWidget cell, is it possible at all!

    1 Reply Last reply
    0
    • F Offline
      F Offline
      francomartins
      wrote on last edited by
      #2

      Try it :
      @

      QTableWidget tw = new QTableWidget(1,1);
      QProgressBar *pgbar = new QProgressBar();
      tw.setCellWidget(0,0,pgbar);
      @

      This example inserts a QProgressBar in a QTableWidget with one row and one column;

      1 Reply Last reply
      0
      • A Offline
        A Offline
        adnan
        wrote on last edited by
        #3

        Thanks for the reply!

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          Or, take a look at libQxt. It has a "delegate":http://libqxt.bitbucket.org/doc/0.6/qxtitemdelegate.html that can do this without relying on adding widgets explicitly, and that works with data from the model itself.

          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