Results 1 to 9 of 9

Thread: QDialog, editingFinished, and Cancel Button.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    8
    Thanked 133 Times in 128 Posts

    Default Re: QDialog, editingFinished, and Cancel Button.

    Quote Originally Posted by jeffpogo View Post
    Thank you for the idea!

    Your suggestion was a good idea, but I can not get it to work correcly for the problems you already mentioned.

    This problem seems like a common issue and saw others asking similar questions, but no good solutions are posted.

    I will try a new design unless someone has other ideas.

    Jeff.
    All the problems can be solved by just some hacking here and there... previously you were stuck with the editfinish() signal emiting before the cancel button.. that was solved by eventfilter... now as far as pressed() goes...

    i think your problem can be solved by just extending the code a bit more... i can give you some hints..

    1. button has a pressed() signal
    2. a button subclass can monitor mouseEnter, mousePress, mouseRelease
    3. events can be sent back to parent widget
    4. you can generate any event (QEvent*) and sent it to any widget.

    using subclasses, eventfilter, and lil bit here an there u can overcome the problem... its may take less than a day. but something tells me it is possible.

    but i like to tell u that the behaviour you want to achieve is very uncommon and i as a user also do not like it... do it the standard way as suggested by someone before.

  2. #2
    Join Date
    May 2009
    Location
    Memphis, TN
    Posts
    22
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    3

    Default Re: QDialog, editingFinished, and Cancel Button.

    For now...

    I am going with the web page style solution...check all the lineedit fields in the form after the ok button is pressed.

    I wanted to only enable the ok button after all the fields had valid data but I will change the logic to enable when all the required fields "are filled-in" and do the database look ups at accept().

    Thank you for the help!

  3. #3
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    8
    Thanked 133 Times in 128 Posts

    Default Re: QDialog, editingFinished, and Cancel Button.

    Quote Originally Posted by jeffpogo View Post
    For now...

    I am going with the web page style solution...check all the lineedit fields in the form after the ok button is pressed.

    I wanted to only enable the ok button after all the fields had valid data but I will change the logic to enable when all the required fields "are filled-in" and do the database look ups at accept().

    Thank you for the help!
    thats the standard way... !! good luck

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.