Results 1 to 11 of 11

Thread: QModelIndex problem!

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2008
    Posts
    38
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    19

    Default Re: QModelIndex problem!

    The point here is to learn something!

    If I had surrendered/redesigned every time I ran into a problem, I'd never have learned anything!

    The code is unimportant here since my ultimate aim is to incorporate the bridge pattern. Ultimately the user will be able to choose the means of server concurrency
    via the bridge pattern. In C# this is straightforward!

    My code in C# is a great testament to the value of patterns!

    Redesign? Why? The user chooses ultimately!

    I started out trying to incorporate Qt4 for gui into my already running program!

    The means of concurrency in TCP/IP is controversial anyway!

    See great work of the deceased W Richard Stevens! www.kohala.com
    Last edited by landonmkelsey; 25th August 2008 at 19:52. Reason: add on

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

    Default Re: QModelIndex problem!

    Quote Originally Posted by landonmkelsey View Post
    The point here is to learn something!

    If I had surrendered/redesigned every time I ran into a problem, I'd never have learned anything!
    You would learn to avoid bad designs and create good ones.

    Redesign? Why? The user chooses ultimately!
    Because the solution is neither scalable nor modular nor straightforward.

    I started out trying to incorporate Qt4 for gui into my already running program!
    So what's keeping you from rewriting some parts of the application to simplify the overall solution instead of wrestling against problems related to mixing two different technologies that only need a minor change to interoperate perfectly?

    The means of concurrency in TCP/IP is controversial anyway!
    I'm not sure what you mean here, but there are numerous designs related to obtaining concurrency in TCP connections - just look at available operation modes of the Apache webserver. If you want multithreading, you are welcome to use it but do it properly, for example by using a thread pool to keep resource usage at a reasonable level while keeping your system responsive.

  3. #3
    Join Date
    Aug 2008
    Posts
    38
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    19

    Talking Re: QModelIndex problem!

    the main point is !

    My C# code uses a bridge pattern to allow the user programmer to select which "client handler" he/she wants/supplies! One can choose the thread pool or 1 client one thread generated on "call-in"

    One may even choose an iterative server!

    I wanted to generate C++ code to do the same thing! Since C++ does not have an "interface", I would have to use an ABC!

    I'll solve the problem myself! Thanks for your help!

    I quess C++ will wither and die! : ( as Java and VB)

    done!
    Last edited by landonmkelsey; 28th August 2008 at 19:50. Reason: missed a word

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: QModelIndex problem!

    Quote Originally Posted by landonmkelsey View Post
    Since C++ does not have an "interface", I would have to use an ABC!
    You don't need a separate keyword for everything. An interface is a special kind of ABC.

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

    Default Re: QModelIndex problem!

    Quote Originally Posted by landonmkelsey View Post
    My C# code uses a bridge pattern to allow the user programmer to select which "client handler" he/she wants/supplies! One can choose the thread pool or 1 client one thread generated on "call-in"
    I quess C++ will wither and die! : ( as Java and VB)
    The language used is independent of the design. If you have some design in C#, you can implement the same design in other languages.

    On the other hand a bad design is bad independent of the language used to implement it.

    You are trying to bridge two technologies that use different concepts. This is possible but prone to errors and that's exactly what you are experiencing. So you can either struggle with that or change one of the concepts.

    As for interfaces - interface is an abstract term. Each class is an interface, a class containing virtual methods is an interface that can be realized in different ways by more than one class, a class containing pure abstract methods is an abstract interface that has to be implemented by other class(es) (an ABC).

Similar Threads

  1. QSql*Model + QTreeView : make a tree
    By punkypogo in forum Qt Programming
    Replies: 18
    Last Post: 24th October 2008, 19:14
  2. Problem with TreeView
    By init2null in forum Qt Programming
    Replies: 8
    Last Post: 25th May 2008, 10:56
  3. QAbstractItemModel newbie question
    By okellogg in forum Qt Programming
    Replies: 14
    Last Post: 18th February 2008, 13:30
  4. Problem: QThead and QTableview
    By ederbs in forum Qt Programming
    Replies: 5
    Last Post: 9th November 2007, 11:17
  5. Replies: 6
    Last Post: 21st September 2007, 14:51

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.