View Full Version : Is there a way, to do something like Windows7 calendar main window ?

17th September 2010, 11:38
http://wstaw.org/m/2010/09/17/ap1_jpg_300x300_q85.jpg (http://wstaw.org/h/d1ca174d1cd/)

this is a screenshot of the calendar from Windows 7 and I have to make something similar to it, but I have no idea how to start or even how to type a question to docs

the way it should work:
when I have appointment which lasts from 08:00 to 10:00, I would like it to be visible in this widget as a rectangle with one side corresponding to the time appointment lasts (here 1:30 hour)

is this possible ?

17th September 2010, 11:56
Yes, it is possible. Either write your own custom widget (be it a descendant of QWidget or QAbstractItemView) or use Graphics View.

17th September 2010, 12:35
this is already a very helpful information
but if I said I have a very short time to do that, what would you suggest as better choice ?

17th September 2010, 12:37
but if I said I have a very short time to do that, what would you suggest as better choice ?
Find a ready component at qt-apps.org.

14th February 2011, 11:30
The first approach to this issue was failure, but now I would like to try one more time.

I read some documentation and I figured out that subclassing QAbstractItemView (or QAbstractTableModel) won't work because I need some rectangles to be placed one under another, but in case of overriding the day (this is vertical header on the screen in the first post) for different items new item should be placed next to not under or above. (like item 3 and item 5 on the attached screenshot)

Maybe there is a way, by using QAbstractTableModel or QAbstractItemView to achieve that every column will handle sizes of the cells by it's own ?
If not I assume that only using QGraphicsView(Scene) this can be achieved


14th February 2011, 12:12
you can look into this : QxtScheduleView (http://www.qtcentre.org/threads/37840-Help-getting-QxtScheduleView-or-somthing-similiar-working?highlight=schedule)


14th February 2011, 16:26
could be useful if it did not throws with undefined references after trying to build the project using it

I installed, put right files in the appropriate folders in qtdir folder but
for example QxtScheduleView can't find qxtglobal.h and qxtnamespace.h (which is weird at the beginning already) - which in fact is the first problem I encountered, but I copied the files manually so as they could be found and than I had the problem with undefined reference

I wrote an email to the author what his position is