Results 1 to 8 of 8

Thread: Pop-up Calendar From Pushbutton

  1. #1
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Pop-up Calendar From Pushbutton

    Hi friends,
    I apologize if its a newbie Question
    Please any one help me how to display a widget (just like a popup calender) as a pushButton that when pressed, will disply a pop up calender or any thing ... i just need like this format to add to my taskbar ..

    please help
    thanks in advance

  2. #2
    Join Date
    Jul 2008
    Posts
    33
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Pop-up Calendar From Pushbutton

    pupo up menu!

  3. #3
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Pop-up Calendar From Pushbutton

    thanks fo reply
    no i want to pop up a widget ( a dialog window) ... when a pushbutton is pressed or toggled...

    i don't know how to use extension example here because the my Qt window is only taskbar size (1010X20) with a push button and i don't know how to introduce a 400X400 dialog window above the button on the taskbar ..

    its like cutting another window and pasting above the pushbutton on taskbar ..
    is there any way ....

  4. #4
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Pop-up Calendar From Pushbutton

    You can get the global pos of the event when u press the button.
    Based on that calculate the rect wher ur dialog will fit in, and show .

  5. The following user says thank you to aamer4yu for this useful post:

    wagmare (16th January 2009)

  6. #5
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Pop-up Calendar From Pushbutton

    thanks for reply
    I will follow by the way ...
    but we cant make any relation with the button and a dialog? i am just asking just to know about it ....
    again thanks for the useful suggestion

  7. #6
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Pop-up Calendar From Pushbutton

    Something like this: Calendar Pop Up?
    J-P Nurmi

  8. The following user says thank you to jpn for this useful post:

    wagmare (16th January 2009)

  9. #7
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Pop-up Calendar From Pushbutton

    exactly this one i needed ... thank you very much .....
    QMenu* pushMenu = new QMenu(pushButton);
    QCalendarWidget* pushCalendar = new QCalendarWidget(pushMenu);
    QWidgetAction* pushAction = new QWidgetAction(pushMenu);
    pushAction->setDefaultWidget(pushCalendar);
    pushMenu->addAction(pushAction);
    pushButton->setMenu(pushMenu);
    in place of calender i have to use another widget ..... i get it ..

  10. #8
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Pop-up Calendar From Pushbutton

    i complete inserting a QWidgetAction ->setDefaultWinget(window) ... this window is designed by me and now the problem is that the entire window behaviour is changed as a toggle pushButton clicking anywhere than a button leads to close the window as toggle the button .... how can i rectify this one .. please help
    the calender program also have the same problem ...
    please help

Similar Threads

  1. Calendar Pop Up
    By Rakesh_Kumar in forum Qt Programming
    Replies: 7
    Last Post: 5th December 2008, 13:31
  2. Help me to load one form over another form PushButton
    By wagmare in forum Qt Programming
    Replies: 7
    Last Post: 26th November 2008, 16:11
  3. Problem with setFont for a PushButton
    By arunvv in forum Newbie
    Replies: 12
    Last Post: 7th April 2008, 23:35
  4. connecting image to a pushbutton
    By sudheer in forum Qt Tools
    Replies: 2
    Last Post: 4th December 2007, 09:23
  5. Replies: 1
    Last Post: 2nd July 2007, 16:29

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.