Results 1 to 1 of 1

Thread: 2x2 Grid Layout with custom widgets and widgets show/hide problem

  1. #1
    Join Date
    Apr 2012
    Qt products

    Default 2x2 Grid Layout with custom widgets and widgets show/hide problem

    Hi guys!
    I have faced the following problem while programming in QT 4.7:
    I have a main window layed out horisontally, containing kind of a control panel (left) and QGridLayout(right). QGridLayout is 2x2 and contains 4 custom widgets derived from QWidget class. When a particular widget in a grid is doubleclicked it is maximized. I have accomplished it by setting the visibility of the rest of widgets in a grid to false. When such a maximized widget is doubleclicked again, the view should revert to it's normal state (2x2).

    And the problem is: when i am setting the wisibility of all 4 widgets within the gridlayout to true, I can see the process of grid resizing (5 steps) instead of seeing the whole grid recalled at once. Such behaviour is non-pleaseant and annoying. Is there a way to block the grid visibility before all elements are recalculated? I have tried several approaches found on the net but none of them worked for me.

    Best regards.

    //*problem solved
    My custom widget used the repaint() method within showEvent(). The repaint() was substituted with update() as the documentation says and the probelm disappeared. Now all widgets appear at once =). thx dr.greenthumb, you're da s*t
    Last edited by airproject; 30th April 2012 at 19:03. Reason: Solved

Similar Threads

  1. Replies: 8
    Last Post: 5th May 2021, 16:41
  2. Problem in layout widgets in a grid
    By franco.amato in forum Newbie
    Replies: 31
    Last Post: 24th November 2010, 22:22
  3. Custom widgets in a grid view
    By ada10 in forum Newbie
    Replies: 2
    Last Post: 23rd August 2010, 11:28
  4. Custom widgets in layout
    By Palmik in forum Newbie
    Replies: 11
    Last Post: 26th January 2009, 12:08
  5. is it possible to animate sliding widgets on show/hide
    By discostu in forum Qt Programming
    Replies: 2
    Last Post: 4th March 2007, 08:59


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.