Results 1 to 2 of 2

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

  1. #1
    Join Date
    Jun 2008
    Location
    Rome, Italy
    Posts
    95
    Thanks
    19
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    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?
    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    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

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.