Results 1 to 2 of 2

Thread: Problem in capturing the event double click on a "QDateEdit".

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2010
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Problem in capturing the event double click on a "QDateEdit".

    Hello everyone,
    I have a problem I would like to capture the event double click on the widget QDateEdit, to do this I wrote the following code:
    Qt Code:
    1. class MyDateEdit : public QDateEdit{
    2. Q_OBJECT
    3. public:
    4. MyDateEdit(QWidget *parent);
    5. ~MyDateEdit();
    6. virtual voidmouseDoubleClickEvent(QMouseEvent *e);
    7. };
    To copy to clipboard, switch view to plain text mode 
    Qt Code:
    1. #include "mydateedit.h"
    2. MyDateEdit::MyDateEdit(QWidget *parent): QDateEdit(parent){
    3. }
    4. MyDateEdit::~MyDateEdit(){
    5. }
    6. void MyDateEdit::mouseDoubleClickEvent(QMouseEvent *e){
    7. QMessageBox::information(0,"","I captured the event double click");
    8. }
    To copy to clipboard, switch view to plain text mode 

    then I expect that at any point of the QDateEdit if I make a double click would display the message "I captured the event double click" ..... but it is not. In fact the message only appears if I do double click on the arrows to increase and decrease QDateEdit. Some of you could explain to me what's wrong?

    Thank you all.
    Bye.
    Attached Files Attached Files

Similar Threads

  1. QDateEdit change the "first day of week"
    By xgoan in forum Qt Programming
    Replies: 5
    Last Post: 23rd December 2013, 07:59
  2. Double Click Capturing
    By ToddAtWSU in forum Qt Programming
    Replies: 2
    Last Post: 8th January 2011, 14:12
  3. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05
  4. qFromLittleEndian returning "double"
    By gyre in forum Newbie
    Replies: 4
    Last Post: 30th December 2007, 01:10
  5. QFile Problem~ "Unknow error" in "open(QIODevice::ReadWrite)"
    By fengtian.we in forum Qt Programming
    Replies: 3
    Last Post: 23rd May 2007, 15:58

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.