Results 1 to 2 of 2

Thread: QWinWidget is not visible with MFC GroupBox

  1. #1
    Join Date
    Feb 2011
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default QWinWidget is not visible with MFC GroupBox

    I have a QWinWidget containing a custom QWidget in an MFC dialog. The QWinWidget appears to be invisible. I can interact with it using the mouse as though it was visible but it is not visible.

    The QWinWidget is inside the area of a GroupBox and this appears to be the issue. If I place the QWinWidget outside of the area of the GroupBox, it is visible. The z-order order of the controls matters as well. If I place the GroupBox above the QWinWidget in the rc file (such that it would receive tab focus first), the QWinWidget is invisible. If I place the GroupBox below the QWinWidget in the rc file, the QWinWidget appears.

    I've seen this behavior in multiple dialogs with different QWinWidgets. The issue does not occur with other MFC controls that are above or below in the z-order.

    Does anyone have any ideas on what might be wrong here?

  2. #2
    Join Date
    Feb 2011
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QWinWidget is not visible with MFC GroupBox

    I stepped into paintEvent() of the QWidget (the child of the QWinWidget) and it appears to be painting itself with a reasonable rect yet it does not appear on the screen. If the GroupBox partially intersects the QWinWidget's rect, the QWinWidget is partially visible and appears to be clipped.

    This one is stumping me. Anyone have any ideas where I might try debugging further?

Similar Threads

  1. Adding layout on groupBox
    By kode in forum Newbie
    Replies: 1
    Last Post: 14th December 2010, 15:49
  2. How to load a Qwidget in groupBox at run time?
    By AviMittal in forum Qt Programming
    Replies: 8
    Last Post: 25th June 2009, 11:35
  3. Two groupbox, if checked one, uncheck other
    By webquinty in forum Qt Programming
    Replies: 4
    Last Post: 13th May 2009, 23:40
  4. Groupbox has no borders ?
    By vieraci in forum Qt Programming
    Replies: 12
    Last Post: 30th April 2009, 12:46
  5. A Shadow of my groupBox
    By baray98 in forum Qt Programming
    Replies: 1
    Last Post: 28th June 2008, 21:41

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.