Results 1 to 7 of 7

Thread: AcceptDrops ?

  1. #1
    Join Date
    Feb 2006
    Posts
    91
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default AcceptDrops ?

    I am using the designer for Qt 4.3. Isn't setting the acceptDrops for a dialog to true supposed to remove that stupid "?" button beside "X" close button and replace it with a "_" minimized button that works ?

    Well my Dialog is of Qt::ApplicationModal, I have set acceptDrops to true but guess I am missing something. In designer I get the Minimized Button but when I compile the dialog has the ? button.

    in the ui_myDialog.h file , it has set the "setAcceptDrops(true)" but still no effect ? Why ??
    Humans make mistake because there is really NO patch for HUMAN STUPIDITY

  2. #2
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: AcceptDrops ?

    Quote Originally Posted by ct View Post
    Isn't setting the acceptDrops for a dialog to true supposed to remove that stupid "?" button beside "X" close button and replace it with a "_" minimized button that works ?
    I don't think so... Where did you get such an idea BTW? Accept drops has no effect on title bar and buttons, it only change the behavior of a widget toward the internal event-driven drag and drop mechanism of Qt...
    The application has no real control over the buttons you're talking about since the frame is handled by the window manager. All one can do is using window flags to pass hints to the WM and, if unsatisfied, override the WM to draw its own frame and control buttons (there's been a thread about this and you can find the result of it in the Qt software section (head for "skins")...).
    Current Qt projects : QCodeEdit, RotiDeCode

  3. #3
    Join Date
    Feb 2006
    Posts
    91
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: AcceptDrops ?

    Well, in the designer when I set the acceptDrops to true the button changed so obviously I thought thats what it is supposed to do .. I am new to Qt 4.3 by the way and a bit rusty in the whole Qt environment

    Humans make mistake because there is really NO patch for HUMAN STUPIDITY

  4. #4
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: AcceptDrops ?

    I guess that's an effect of the preview window... Not even really a change unless I'm missing something (can't know as your attachment is someway corrupted (talking about the link here...))
    Current Qt projects : QCodeEdit, RotiDeCode

  5. #5
    Join Date
    Feb 2006
    Posts
    91
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: AcceptDrops ?

    The link is fine. You saw the [_][X] didn't you ? thats the part of the dialog. Shouldn't the preview give an overview of what the dialog is likely to be.

    Instead of [_][X] I still get [?][X] on the upper side of the dialog after compiling.
    Humans make mistake because there is really NO patch for HUMAN STUPIDITY

  6. #6
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: AcceptDrops ?

    Quote Originally Posted by ct View Post
    The link is fine. You saw the [_][X] didn't you ?
    I saw nothing but a page telling me something akin to : "Invalid Attachment specified. If you followed a valid link, please notify the administrator"

    Instead of [_][X] I still get [?][X] on the upper side of the dialog after compiling.
    Then the preview is not to blame but the window flags I've been talking about already ,or your Window Manager though I really doubt it... As these flags cannot be modified within Qt Designer you got to add a few lines of code within your source, e.g. :
    Qt Code:
    1. setWindowFlags((windowFlags() & (~Qt::WindowContextHelpButtonHint)) | Qt::WindowMinimizeButtonHint);
    To copy to clipboard, switch view to plain text mode 
    Current Qt projects : QCodeEdit, RotiDeCode

  7. The following user says thank you to fullmetalcoder for this useful post:

    ct (23rd July 2007)

  8. #7
    Join Date
    Feb 2006
    Posts
    91
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: AcceptDrops ?

    Thanks, thats a neat piece of code, it worked. I guess I am not used to attachments, I will see to it that I will get it right next time.
    Thanx again.
    Humans make mistake because there is really NO patch for HUMAN STUPIDITY

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.