Results 1 to 20 of 20

Thread: Qt against WPF

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Qt against WPF

    Can you draw a sketch, or explain in detail what kind of widget you want to achieve.
    A table with buttons isn't very difficult to create.

    If you can't achieve what you want with just composing some widgets, then you need to subclass a widget.
    The abstract model/view classes are ideal to display all kinds of data, but it will take you some effort to do all the painting and data handling.
    Or you could use the QGraphicsView/Scene/Items.

    But if you could explain in more detail what kind of data you want to show, and how you want to show it, it might be easier to give a more correct answer I think.

  2. #2
    Join Date
    May 2010
    Posts
    7
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt against WPF

    lets have as example the windows live (or outlook 2007) calender

    windows live cal&#10.jpg

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

    Default Re: Qt against WPF

    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
    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.


  4. #4
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Qt against WPF

    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.

  5. #5
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Qt against WPF

    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.

  6. #6
    Join Date
    May 2010
    Posts
    7
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt against WPF

    thanks.

    how much time would you approximately need to develop a widget as the shown windows live clander?

  7. #7
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Qt against WPF

    Quote Originally Posted by soulbug View Post
    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.

  8. The following user says thank you to tbscope for this useful post:

    soulbug (15th May 2010)

  9. #8
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Qt against WPF

    Quote Originally Posted by soulbug View Post
    thanks.

    how much time would you approximately need to develop a widget as the shown windows live clander?
    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.

  10. #9
    Join Date
    May 2010
    Posts
    7
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt against WPF

    thanks guys,
    espicially to tbscope

    i will have a look on this GraphicsView class - the possiblities seem to be easiely available

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

    Default Re: Qt against WPF

    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.
    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.


  12. #11
    Join Date
    May 2010
    Posts
    7
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt against WPF

    Quote Originally Posted by wysota View Post
    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.
    you had good expierences with it?

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

    Default Re: Qt against WPF

    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.
    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.


  14. #13
    Join Date
    Mar 2010
    Posts
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: Qt against WPF

    You should look for a few samples/tutorials before starting to develop your application. You should also get some books about Qt (you can find a list of books here, and a free online book here).
    Come to the dark side. We have cookies.

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.