Results 1 to 5 of 5

Thread: Few questions

  1. #1
    Join Date
    Mar 2008
    Location
    Houston, Texas, USA
    Posts
    277
    Thanks
    9
    Thanked 17 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Maemo/MeeGo

    Default Few questions

    I really love the videos. I hope to see more in the future especially on QtScript and QtDBus maybe? Anyways I have a few questions on the MVC.

    I noticed a few examples here and there are quite different. Like for example the ones on Qt's examples has a normal class that doesn't inherit from anything not even QObject and injected into the model. And some don't do this and inject directly into the model if you understand what I'm saying. Which is the most better approach or what?

    Correct me if I'm wrong. If a delegate is mainly for giving the "special effects". Would it be more appropriate to handle it returning it in the delegate than letting a model or view handle that?
    Qt-4.7.3 | Gentoo ~amd64 | KDE-4.7
    Aki IRC Client for KDE4 | Qt Documentation

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

    Default Re: Few questions

    Quote Originally Posted by ComaWhite View Post
    Like for example the ones on Qt's examples has a normal class that doesn't inherit from anything not even QObject and injected into the model. And some don't do this and inject directly into the model if you understand what I'm saying. Which is the most better approach or what?
    Could you rephrase your question? Or give a short example of what you mean as it's hard to understand what classes you are talking about.

    Correct me if I'm wrong. If a delegate is mainly for giving the "special effects".
    It's not. It's for changing the way a single item behaves.
    Would it be more appropriate to handle it returning it in the delegate than letting a model or view handle that?
    Handle what? What is "it"?
    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.


  3. #3
    Join Date
    Mar 2008
    Location
    Houston, Texas, USA
    Posts
    277
    Thanks
    9
    Thanked 17 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Maemo/MeeGo

    Default Re: Few questions

    Here is one of Qt's examples. http://doc.trolltech.com/4.5/itemvie...treemodel.html

    It uses a regular class called TreeItem. To insert information and to get info from it. Like some examples I have found on the net or have read in books don't always use this kind of approach when doing MVC.

    I forgot what the last question was suppose to handle
    Qt-4.7.3 | Gentoo ~amd64 | KDE-4.7
    Aki IRC Client for KDE4 | Qt Documentation

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

    Default Re: Few questions

    Quote Originally Posted by ComaWhite View Post
    It uses a regular class called TreeItem. To insert information and to get info from it. Like some examples I have found on the net or have read in books don't always use this kind of approach when doing MVC.
    Ok, but what is the question?

    A model operates on some data... it can either be generated on the fly or stored somewhere outside the model or in the model and the item objects are there exactly to store the data in the model... I'm not sure what you're asking about

    Maybe this article helps:
    http://blog.wysota.eu.org/index.php/...ta-redundancy/
    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.


  5. #5
    Join Date
    Mar 2008
    Location
    Houston, Texas, USA
    Posts
    277
    Thanks
    9
    Thanked 17 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Maemo/MeeGo

    Default Re: Few questions

    Thank you that helped clear a few things.
    Qt-4.7.3 | Gentoo ~amd64 | KDE-4.7
    Aki IRC Client for KDE4 | Qt Documentation

Similar Threads

  1. Who gets questions answered and who doesn't?
    By gjshannon in forum General Discussion
    Replies: 15
    Last Post: 19th March 2009, 21:02
  2. Some questions in Qt's Source Code
    By vql in forum Qt Programming
    Replies: 5
    Last Post: 17th November 2007, 08:46
  3. Memory management questions (im new to Qt)
    By scarvenger in forum Qt Programming
    Replies: 2
    Last Post: 6th May 2007, 07:41
  4. 2 Questions about layouts
    By SkripT in forum Qt Programming
    Replies: 1
    Last Post: 26th February 2006, 13:54
  5. Qt related questions and thoughts about getting job
    By AlexKiriukha in forum General Discussion
    Replies: 4
    Last Post: 26th January 2006, 12:25

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.