Results 1 to 7 of 7

Thread: creating a global instance

  1. #1
    Join Date
    Feb 2006
    Posts
    3
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default creating a global instance

    Hi all,
    iam new to this forum..

    iam quite new to Qt environment
    i have a problem in qt, i want to create a global instance which can be accessible to all the rest of the forms in the project.

    in detail..
    iam developing a GUI for the existing library which is developed by my professor which is written in c++,
    i want to create an instance of the class(from existing library) in the main form and that should be accessed in all the forms of the rest of the project.
    can any one please give a solution for this....

    sarkar

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

    Default Re: creating a global instance

    Maybe singleton pattern will help?

  3. #3
    Join Date
    Feb 2006
    Posts
    3
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default declaring global instance of a class

    Hi all,
    iam new to this forum..

    iam quite new to Qt environment
    i have a problem in qt, i want to create a global instance of a class which can be accessible to all the rest of the forms in the project.
    can any one please give a solution for this....

    sarkar

  4. #4
    Join Date
    Jan 2006
    Location
    India
    Posts
    115
    Thanks
    3
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

  5. #5
    Join Date
    Jan 2006
    Location
    Ukraine,Lviv
    Posts
    454
    Thanks
    9
    Thanked 27 Times in 27 Posts
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: declaring global instance of a class

    just friendly suggestion :
    before start learn qt read c++ fundamental topics
    a life without programming is like an empty bottle

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

    Default Re: declaring global instance of a class

    Please, don't ask the same question twice in different forums.

  7. #7
    Join Date
    Jan 2006
    Posts
    185
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: creating a global instance

    What is the library type given to you by your professor:

    .dll ?
    .so ?

Similar Threads

  1. Replies: 1
    Last Post: 7th August 2008, 14:46
  2. Creating a global array in my code???
    By therealjag in forum General Programming
    Replies: 5
    Last Post: 13th March 2006, 12:13

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.