Results 1 to 4 of 4

Thread: How to implement expand/collapse functionality of logging output?

  1. #1
    Join Date
    Mar 2011
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default How to implement expand/collapse functionality of logging output?

    Hi all,

    I've written my own QDialog that monitors the startup procedure on one of our systems. What I am after is the ability to selectively expand or hide information about each of the steps that is happening.

    I'm envisioning something similar to the dialog present when Ubuntu does its software updates - it gives a short text description of what its doing (e.g. "Installing..."), and then there is a triangle icon to its right that, when clicked, causes the dialog to expand to show the current log output (or stdout, or whatever), with the triangle going from side-pointing to down-pointing.

    I found someone inquiring about something similar many years ago here:
    http://lists.trolltech.com/qt-intere...ad00130-0.html

    The reason I hesitate to implement what was shown in that link is it seems like Qt should have this functionality already - QTreeView has the functionality and the icon, obviously there are a number of widgets for displaying text, but they don't seem to play nicely together.

    Is there something more simple that I'm missing, or do I just have to implement it myself?

    Thanks in advance,
    Barry

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to implement expand/collapse functionality of logging output?

    [wiki]Expanding dialog[/wiki]


    ... or just show/hide the "expanded" part as you need it regardless of size constraints.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Mar 2011
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to implement expand/collapse functionality of logging output?

    Sort of what I was afraid of...I was clearly making the problem much more complicated than it needs to be! Thanks!

    Corollary question - does anyone know what the little triangle icons that indicate expand/collapse (such as in a QTreeView) are called? I'd like to use them (applied to a click-able label, for example) instead of a push button.

    Thanks again,
    Barry

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to implement expand/collapse functionality of logging output?

    I think they are QStyle::PE_IndicatorArrowUp and QStyle::PE_IndicatorArrowDown.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. The following user says thank you to wysota for this useful post:

    bobrien (19th July 2012)

Similar Threads

  1. Replies: 0
    Last Post: 26th June 2012, 04:07
  2. Replies: 1
    Last Post: 4th February 2011, 01:41
  3. QTreeWidget Expand/Collapse Button Size
    By Slewman in forum Qt Programming
    Replies: 3
    Last Post: 28th July 2010, 11:07
  4. Collapse/Expand button in QTreeViewWidget
    By Skorpien126 in forum Qt Programming
    Replies: 3
    Last Post: 10th June 2010, 12:30
  5. preserve collapse/expand of a QTreeView
    By yazwas in forum Qt Programming
    Replies: 1
    Last Post: 7th November 2009, 09:49

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.