Search code examples
c++qtqt4qwidget

QCalendarWidget as "Pop-up", not as new Window?


I want to create a Settings-Widget, where I can choose a Date.
Because it isn't nice to create 3 QLineEdits to call the QDate-Constructor with QDate(int year, int month, int day), I thought it would be better, if you can push a "show calendar"-Button for example, where you can choose the date.
But I don't want to show this calendar in a new Window, I want to show it as a "Pop-up" (I don't know how to explain this), which you might know for example from the OpenOffice-Settings.
You have any idea how to implement that?


Solution

  • For an alternate option, have you considered using QDateEdit? It will allow your users to edit the date in a format that is consistent with the rest of the operating system.