Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. qcalendarwidget
    Log in to post
    • All categories
    • P

      Unsolved Qcalendar in the same window as the main ui
      General and Desktop • qcalendarwidget general problem • • poggers

      2
      0
      Votes
      2
      Posts
      87
      Views

      JonB

      @poggers
      What do you mean by this "separate window"? Are you talking about the popup, see dateEditEnabled, also Using a Pop-up Calendar Widget? Or something else?

    • M

      Solved Put a png image as cells backgrounds in a QCalendarWidget
      General and Desktop • qcalendarwidget • • marquessbr

      9
      0
      Votes
      9
      Posts
      3197
      Views

      M

      Now it is working here, I connect the buttons action to the calendar using:

      currentDate.setFullYear(aNewYear, aNewMonth, aNewDay); calendar.selectedDate = new Date(aNewYear, aNewMonth, aNewDay); calendar.update();

      Now I have a calendar and a custom navigation bar

      thanks for all!

    • Nathaniel

      Unsolved Getting mouse events with QCalendarWidget
      General and Desktop • qcalendarwidget • • Nathaniel

      2
      0
      Votes
      2
      Posts
      1010
      Views

      raven-worx

      @Nathaniel
      why do you believe this is "sloppy"?! Actually it is the exact difference.
      In common UX concepts you select only with left mouse button and show a context menu with right mouse button.

      To get events you can install an eventfilter on the view:

      calendarWidget->findChild<QTableView*>("qt_calendar_calendarview")->installEventFilter( this );
    • L

      QCalenderWidget double click event not working or am i doing wrong?
      General and Desktop • qcalendarwidget doubleclickeven • • Lorence

      2
      0
      Votes
      2
      Posts
      1100
      Views

      mrjj

      Hi
      The signal Activated also triggers for db clicks.
      so

      connect(ui->calendarWidget, QCalendarWidget::activated, this , MainWindow::CalendarDBClick); and the slot function public slots: void CalendarDBClick(const QDate& Date) { setWindowTitle(Date.toString("dd.MM.yyyy")); }

      No need to subclass, just hook up signal.

    • F

      I want to increase the Height of the navigationBar in CalendarWidget
      General and Desktop • navigation height qcalendarwidget stylesheet • • ForestPoem

      5
      0
      Votes
      5
      Posts
      2112
      Views

      F

      @mrjj
      Oh thank you very much. It's a good thing to learn!

    • G

      [Solved]how to take input date from user and show related data saved in a database and display in listview model base
      General and Desktop • sql qcalendarwidget • • Gillou_beginqt

      4
      0
      Votes
      4
      Posts
      716
      Views

      SGaist

      You're welcome !

      If this answers your question, please update the thread title prepending [solved] so other forum uses may know a solution has been found :)

      Also, consider up-voting answer(s) that helped you, it will make it easier for other users to find them.

    • N

      Flag dates in calendar that have appointments
      General and Desktop • qcalendarwidget • • nikki16

      2
      0
      Votes
      2
      Posts
      517
      Views

      mrjj

      you mean the calendar Widget ?
      As far as I know, it has no concept of appointments so even that it supports styling, it is not really
      possible to by styling.

      But, you can quite easy draw it yourself and add the needed support for appointment.

      https://wiki.qt.io/How_to_create_a_custom_calender_widget

    • A

      Decreasing the size of QCalendarWidget
      General and Desktop • qcalendarwidget • • air57

      2
      0
      Votes
      2
      Posts
      696
      Views

      V

      To decrease the size of QCalendarWidget you have to find the QTableView inside QCalendarWidget and then set the headers size to zero (or any size you want). You can also set the font size to a small (but visible) value.

      In the following code cal is a pointer to QCalendarWidget

      QTableView* calendarView = 0; for(auto i : qAsConst(cal->children())) { calendarView = dynamic_cast<QTableView*>(i); if(calendarView) { qDebug() << "View Found"; QHeaderView* hh = calendarView->horizontalHeader(); QHeaderView* vh = calendarView->verticalHeader(); QFont font = calendarView->font(); font.setPointSize(8); calendarView->setFont(font); hh->setMinimumSectionSize(0); vh->setMinimumSectionSize(0); } }
    • B

      how to see existing key events in QCalendarWidget
      General and Desktop • qcalendarwidget • • badq

      2
      0
      Votes
      2
      Posts
      514
      Views

      SGaist

      Hi and welcome to devnet,

      You should take a look at the sources of QCalendarWidget, you'll have all the information you want there