Results 1 to 3 of 3

Thread: Please help me to check this simple project,thanks!

  1. #1
    Join Date
    Oct 2009
    Posts
    22
    Thanks
    8
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Please help me to check this simple project,thanks!

    In this project,I want to connect a QLineEdit's doubleclick to a QCalendarWidget's modal-show[a mainwindow's method name of selectdate] .but i can't find this signal,so i connect it to a button's click occasional .has any better methods?
    When i launch the app, the Calendar can show currently.next,i want connect the Calendar's
    double click to change LineEdit's text and close it[a mainwindow's method name of setlineeditdate],but it don't work,why?
    Thanks !
    Attached Files Attached Files

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Please help me to check this simple project,thanks!

    you can install event filter on your calendar widget and catch double-click or you can sub-class QCalendarWidget and reimplement mouseDoubleClickEvent.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  3. #3
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Please help me to check this simple project,thanks!

    btw, fix you connection, it should look like
    Qt Code:
    1. ...
    2. connect(calendar,SIGNAL(activated(const QDate&)),this,SLOT(setlineeditdate(const QDate&)));
    3. ...
    To copy to clipboard, switch view to plain text mode 
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

Similar Threads

  1. A simple example of a tree model
    By YaK in forum Qt Programming
    Replies: 2
    Last Post: 4th March 2009, 17:15
  2. Replies: 0
    Last Post: 2nd May 2008, 07:57
  3. Check a point inside or outside a road?
    By kstking in forum Qt Programming
    Replies: 1
    Last Post: 15th October 2007, 18:48
  4. Check and Uncheck on a Dir Tree?
    By vishal.chauhan in forum Qt Programming
    Replies: 2
    Last Post: 3rd July 2007, 11:55
  5. How to check a file for changes since last save
    By nmather in forum General Programming
    Replies: 2
    Last Post: 21st April 2007, 23:43

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.