Results 1 to 2 of 2

Thread: Block for interactions

  1. #1
    Join Date
    Apr 2009
    Posts
    32
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Block for interactions

    I have a widget with a push button. When the push button is pressed the cursor changes to a WaitCursor (hour-glass shaped cursor). In the same instant, I want all user-interaction with the widget to be blocked. That is, the widget should change to the same state it has when eg. being blocked by a modal dialog.

    Is this just calling setEnabled(False) or is there some more specific method? A blocked widget looks different from a disabled widget.

    Best regards,

    Mads

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

    Default Re: Block for interactions

    It's just calling setEnabled(false). With a modal dialog the situation is different, input events are simply not being processed. If you want the exact same behaviour (which would seem unnatural to the user), apply an event filter on all the widgets in the window and steal their input events.
    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.


Similar Threads

  1. Replies: 0
    Last Post: 2nd June 2009, 15:57
  2. Text block centering in Qt4.4 QTextEdit
    By mla1290 in forum Qt Programming
    Replies: 3
    Last Post: 10th July 2008, 17:46
  3. How to block the textedit'd text to be copied
    By santosh.kumar in forum Qt Programming
    Replies: 2
    Last Post: 2nd November 2007, 10:54
  4. Block close dialog
    By Mrdata in forum Newbie
    Replies: 2
    Last Post: 12th March 2007, 15:39
  5. Replies: 5
    Last Post: 23rd February 2007, 10:23

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
  •  
Qt is a trademark of The Qt Company.