Results 1 to 3 of 3

Thread: [ubuntu[ Tree with qt

  1. #1
    Join Date
    Aug 2015
    Posts
    14
    Thanks
    1
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Android

    Default [ubuntu[ Tree with qt

    I want to create a binary tree with QObject (NO QTREEWIEW) but i'm wrong:
    The profondity is 10.
    Read boo.h and boo.cpo
    There is a method in boo.h, "void fill(int depth)" which called recursive to create sx and dx child elements to make tree like this:



    / S S S S
    D
    D S
    D
    D S S
    D S D
    D D S
    D D D
    D S S S
    D
    D S
    D
    D S S
    D S D
    D D S
    D D D
    Attached Files Attached Files

  2. #2
    Join Date
    Oct 2009
    Location
    Germany
    Posts
    120
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: [ubuntu[ Tree with qt

    Hello,

    and what is your question? What do you get and what do you expect?

    I have to guess a little bit: Your program compiles fine and when you run it on linux, you see only some debug messages output by your program, but not the tree you expect. Now let's have a look at QObject::dumpObjectInfo() documentation:
    Dumps information about signal connections, etc. for this object to the debug output.

    This function is useful for debugging, but does nothing if the library has been compiled in release mode (i.e. without debugging information).
    Here library refers to the Qt library containing QObject. If you use Qt from your ubuntu repository, the Qt libraries are by default compiled in release mode and therefore, according to the documentation, you get no output. Note that this does not change if you build your code in debug mode!

    I ran your program under Windows, where we have a set of debug and release libraries. Here I get the following output in debug build (for depth 3):
    Qt Code:
    1. filling
    2. Filled
    3. OBJECT foo::unnamed
    4. SIGNALS OUT
    5. <None>
    6. SIGNALS IN
    7. <None>
    8. foo::
    9. foo::
    10. foo::
    11. foo::
    12. foo::
    13. foo::
    14. foo::
    15. dumped
    To copy to clipboard, switch view to plain text mode 
    Possibly not what you expected. You get information about signal/slot connection and not about your member objects. I'm afraid you have to write your own recursive dump function for outputting your S and D settings.

    Best regards
    ars

  3. #3
    Join Date
    Aug 2015
    Posts
    14
    Thanks
    1
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Android

    Default Re: [ubuntu[ Tree with qt

    It's OK, I thinked the .dumpTree() doesn't show anything because the tree is empty

Similar Threads

  1. Replies: 6
    Last Post: 28th July 2015, 18:54
  2. Adding a small tree to an existing tree in QTreeview.
    By salcin in forum Qt Programming
    Replies: 0
    Last Post: 25th September 2013, 17:27
  3. Qt on Ubuntu 10.04 from Ubuntu packages?
    By teele in forum Installation and Deployment
    Replies: 5
    Last Post: 28th March 2012, 08:41
  4. AVL-tree
    By FORever_YOUng in forum Newbie
    Replies: 6
    Last Post: 30th May 2011, 12:03
  5. tree widget like designer's widget tree
    By nroberts in forum Newbie
    Replies: 1
    Last Post: 20th November 2010, 00:06

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.