lets have as example the windows live (or outlook 2007) calender
windows live cal
.jpg
lets have as example the windows live (or outlook 2007) calender
windows live cal
.jpg
So? What about it? It's definitely not a single control but two completely separate controls one besides the other and the one on the right is not composed of subcontrols but rather from items, just like in Qt we'd do with GraphicsView. And it's not WPF (although I don't know much about WPF so I could be wrong but I think WPF was not available in 2006-2007 yet). I don't know if it answers your question, whatever it was![]()
Indeed.
You can do this with QGraphicsView which I think would be the easiest path for you.
Or, you can write a custom itemmodel and itemview, which I think is the most correct way to handle this widget, but also takes a little bit more work.
This are two very different frameworks, not only for "presentation" of your data in simple to design/implement way. So we (by "we", i talk about members of this forum) like Qt and will recommend Qt, if you ask on some .NET forum they will recommend .NET (WPF).
Things to consider: Qt is native (C++ code), WPF/.Net runs in CLI (virtual machine), Qt code runs on Linux and Mac with most likely no modification to code (+ the things mentioned in posts before). There must be some advantages to .NET but i didn't work enough with that to know them (i worked only with C++, not with the CLI implementation, learning to write portable code is my reason for that)
Instead of Conclusion: Nobody can tell you witch of two different things is better for you ( better can be simple to learn, easy to use, fast enough for your task, etc...) and "better" for you might depend on what language you already know, if you know C++, Qt framework will be very easy to learn (for me it seams easier to learn then C++ standard library)
So, my advice: "play" with each and choose what you like/ learn easy/ does the job you are trying to do.
thanks.
how much time would you approximately need to develop a widget as the shown windows live clander?
I do not think anyone can answer that correctly.
I think I would need 2 or 3 days. But I don't know you nor your skills
I would create a custom itemmodel CalenderModel, which handles CalenderItems.
Then I would create an itemview CalenderView, which displays the items in CalenderModel. Display those calender items in the model that belong to the selected month or day.
Then you can use delegates to draw items differently.
Of course, the more functionalities you need, the more work you need to invest. If you want to have weekviews, dayviews, monthviews, you need to create those.
It's about the same with using GraphicsView.
You need to create a container for calender items. Then use that container to draw GraphicsItems. The advantage here is that most of the painting is already done for you as there are several standard graphicsitems for text, rectangles etc...
But that's just my guess.
soulbug (15th May 2010)
That's an even harder question, we can't know what you already know and how fast are you learning.
Take a book on Qt, do the examples, see how "things" are made and then try to do your own, because if you learn just by try/error/re-try/error and so on, you wont become more efficient with Qt (or any other programming framework or language) to really learn and get some knowledge from what you learned, you need to understand how to make things well, and why that aproatch is better than others.
thanks guys,
espicially to tbscope
i will have a look on this GraphicsView class - the possiblities seem to be easiely available
If you are looking at a direct equivalent of WPF, you should pay close attention to QML although if all you are after is implementing a calendar then I doubt QML will have anything extra to offer besides what Graphics View offers.
I have seen QML in action but didn't yet find time to do anything with it myself. Anyway it is a declarative rectangle and state-machine based language for defining user interfaces and simple interactions between elements that allow you to do some fancy stuff. But I think a calendar doesn't require any fancy stuff so superiority of QML over pure C++ in this case is very limited.
Bookmarks