Results 1 to 2 of 2

Thread: How can I add a QCalendarWidget to a QToolBar?

  1. #1
    Join Date
    Jun 2008
    Rome, Italy
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    MacOS X Unix/X11 Windows

    Question How can I add a QCalendarWidget to a QToolBar?

    Hi to All,
    I'm trying to add a QCalendarWidget to a QToolBar via Qt Designer, I drag and drop the widget but nothing happens. Is there a procedure?

  2. #2
    Join Date
    Jan 2006
    Warsaw, Poland
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits

    Default Re: How can I add a QCalendarWidget to a QToolBar?

    You can't do that via Designer. You have to use QToolBar::addAction() with QWidgetAction pointing to the calendar. This probably won't look good though. Try QDateEdit with calendarPopup property enabled.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.

  3. The following user says thank you to wysota for this useful post:

    cydside (11th April 2009)

Similar Threads

  1. MacOS and QToolBar?
    By Dale in forum Qt Programming
    Replies: 4
    Last Post: 26th May 2009, 06:45
  2. QCalendarWidget background image
    By khcbabu in forum Newbie
    Replies: 0
    Last Post: 31st March 2009, 12:51
  3. Problem repainting a subclassed QCalendarWidget
    By darkadept in forum Qt Programming
    Replies: 9
    Last Post: 28th September 2007, 23:54
  4. How Do I Float a QToolBar?
    By dvmorris in forum Qt Programming
    Replies: 7
    Last Post: 29th April 2007, 19:01
  5. Insert separate QToolBar into QMainWindow
    By YuriyRusinov in forum Qt Programming
    Replies: 3
    Last Post: 24th April 2006, 10:37


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.