Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 14, 2025

Problem

When there are many results in the TTD Memory Query widget, the scroll bar doesn't work properly, and the last few results can only be seen when closing the bottom sidebars. This makes it difficult to view and interact with all query results, particularly when working with large TTD memory traces.

Root Cause

The issue was caused by fixed minimum size constraints on the widgets:

  • TTDMemoryQueryWidget had setMinimumSize(800, 600)
  • TTDMemoryWidget had setMinimumSize(900, 700)

These hard-coded minimum sizes prevented the widgets from properly adapting to the available space when placed in a sidebar. When the sidebar was constrained vertically (e.g., by bottom sidebars being open), the fixed minimum sizes caused the table widget to extend beyond the visible area. Since the parent widgets couldn't shrink below their minimum sizes, Qt's layout system was unable to properly allocate space, resulting in the table being clipped and the scroll bar becoming non-functional.

Solution

Replaced the fixed minimum size constraints with proper Qt size policies:

  1. Set QSizePolicy::Expanding on both TTDMemoryQueryWidget and TTDMemoryWidget to allow them to adapt to available sidebar space
  2. Set QSizePolicy::Expanding on the results table (m_resultsTable) to ensure it properly expands and contracts within the layout

This follows Qt best practices for widgets in dynamic layouts, allowing the layout system to properly manage widget sizes based on available space while ensuring the scroll bar functions correctly.

Impact

  • ✅ Scroll bar now works correctly regardless of the number of results
  • ✅ Users can view all results without closing bottom sidebars
  • ✅ Widgets properly adapt to different sidebar configurations
  • ✅ No functional changes - only layout behavior improvements

Fixes #[issue_number]

Original prompt

This section details on the original issue you should resolve

<issue_title>Debugger TTD query widget can be clipped</issue_title>
<issue_description>When there are many results, sometimes the scroll bar does not work properly, and the last few results can only be seen when you close the bottom sidebars</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #872


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

…traints

Co-authored-by: xusheng6 <94503187+xusheng6@users.noreply.github.com>
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Co-authored-by: xusheng6 <94503187+xusheng6@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Fix clipping issue in debugger TTD query widget Fix TTD Memory Query widget scroll bar clipping issue Oct 14, 2025
@Copilot Copilot AI requested a review from xusheng6 October 14, 2025 03:29
Copilot finished work on behalf of xusheng6 October 14, 2025 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Debugger TTD query widget can be clipped

3 participants