Results 1 to 7 of 7

Thread: TableWidget

  1. #1
    Join Date
    Apr 2010
    Location
    Rzeszów \ Poland
    Posts
    26
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60

    Lightbulb TableWidget

    Hello.
    I have a litte question about QTableWidget:
    I want to change header label text orientation to vertical.
    Can you tell me how to do it?
    I have tried different ways, I have asked a google, but I still dont know to solve this problem. ;-(

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: TableWidget

    Create your own QTableWidgetItem by subclassing, swap the size hint and rotate the painter before drawing by calling the base class function. Set this item then as a header item.

  3. #3
    Join Date
    Apr 2010
    Location
    Rzeszów \ Poland
    Posts
    26
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60

    Lightbulb Re: TableWidget

    I dont understand..
    First: i create item:
    Qt Code:
    To copy to clipboard, switch view to plain text mode 
    Next: i set text:
    Qt Code:
    1. item->setText("Dupa");
    To copy to clipboard, switch view to plain text mode 

    And what now?

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: TableWidget

    Ups, sorry I was confused with graphics items. Please forget my last post. See http://qt-apps.org/content/show.php/...content=103154 for ideas to solve your problem.

  5. #5
    Join Date
    Apr 2010
    Location
    Rzeszów \ Poland
    Posts
    26
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: TableWidget

    I still dont know how to do it..
    I use QtCreator and:

    Qt Code:
    1. ui->tableWidget->setColumnCount(8);
    2. ui->tableWidget->setRowCount(8);
    To copy to clipboard, switch view to plain text mode 

    after
    Qt Code:
    1. ...
    2. ui->tableWidget->setHorizontalHeaderLabels(poz);
    To copy to clipboard, switch view to plain text mode 

    What write between?

  6. #6
    Join Date
    Apr 2010
    Location
    Rzeszów \ Poland
    Posts
    26
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60

    Unhappy Re: TableWidget

    Anyone can help me? ;- (

  7. #7
    Join Date
    Dec 2009
    Posts
    8
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: TableWidget

    wrong response
    Last edited by genomega; 2nd May 2010 at 20:19. Reason: updated contents

Similar Threads

  1. complete tablewidget
    By tux-world in forum Newbie
    Replies: 3
    Last Post: 11th March 2010, 02:07
  2. [B]tableWidget row,col to textEdit[B]
    By briang in forum Newbie
    Replies: 1
    Last Post: 6th November 2009, 04:22
  3. HELP with tableWidget & textWidget
    By briang in forum Qt Programming
    Replies: 0
    Last Post: 4th November 2009, 06:30
  4. problem with tablewidget..
    By reshma in forum Qt Programming
    Replies: 6
    Last Post: 22nd March 2009, 15:37
  5. Name of TableWidget/TreeWidget
    By ankurjain in forum Qt Programming
    Replies: 8
    Last Post: 15th April 2006, 05:36

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.