Results 1 to 2 of 2

Thread: QTreeWidget, i cant see the items

  1. #1
    Join Date
    Dec 2011
    Posts
    11
    Platforms
    Unix/X11

    Default QTreeWidget, i cant see the items

    I add items to a treewidget but i cannot see them
    i am usings qtjambi, here is the code, the libraryTree is the QTreeWidget
    Qt Code:
    1. QTreeWidgetItem allItem = new QTreeWidgetItem(libraryTree);
    2. allItem.setText(1, "All");
    3. libraryTree.addTopLevelItem(allItem);
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Dec 2011
    Posts
    11
    Platforms
    Unix/X11

    Default Re: QTreeWidget, i cant see the items

    using this i release that it never get past the second line until i close the window
    Qt Code:
    1. System.out.println("Add item");
    2. QTreeWidgetItem allItem = new QTreeWidgetItem(libraryTree);
    3. System.out.println("1");
    4. allItem.setText(1, "All");
    5. System.out.println("2");
    6. libraryTree.addTopLevelItem(allItem);
    7. System.out.println("The item has been added");
    To copy to clipboard, switch view to plain text mode 

    output:
    Qt Code:
    1. Add item
    2. QObject::startTimer: QTimer can only be used with threads started with QThread
    3. QObject::startTimer: QTimer can only be used with threads started with QThread
    4. 1
    5. 2
    6. The item has been added
    To copy to clipboard, switch view to plain text mode 
    what thread and timer has to do with that?

Similar Threads

  1. removing items QTreeWidget
    By Mystical Groovy in forum Qt Programming
    Replies: 3
    Last Post: 25th March 2015, 22:58
  2. Moving items in a QTreeWidget
    By sudheer168 in forum Qt Programming
    Replies: 0
    Last Post: 7th November 2011, 16:01
  3. How to delete items in QTreeWidget...
    By Patrick Sorcery in forum Newbie
    Replies: 12
    Last Post: 10th September 2010, 10:41
  4. The order of items in QTreeWidget
    By KK in forum Qt Programming
    Replies: 4
    Last Post: 27th February 2009, 05:54
  5. amount of items in QTreeWidget
    By supergillis in forum Qt Programming
    Replies: 4
    Last Post: 1st August 2008, 23:38

Tags for this Thread

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.