Results 1 to 9 of 9

Thread: Accessing GUI widget from different class

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Sep 2011
    Posts
    1,241
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    3
    Thanked 127 Times in 126 Posts

    Default Re: Accessing GUI widget from different class

    Off topic, but Op has circular reference => design error.

    Main window composed of sslserver, and sslserver impl also needs full knowledge of MainWindow.

    edit:
    I think that main window code in your sslserver is just you being a bit confused. You want to be updating the existing mainwin nit creating a new one. So there you should emit a signal with the new count as an argument. Connect that signal to a slot on your mainwin, and from there you can update the label text
    Last edited by amleto; 4th December 2012 at 21:52.
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

Similar Threads

  1. accessing static member variables of one class in another class
    By jasonknight in forum General Programming
    Replies: 5
    Last Post: 6th September 2010, 14:53
  2. Accessing a class Object by pointer in another class
    By pdoria in forum Qt Programming
    Replies: 2
    Last Post: 14th January 2008, 15:59
  3. Not accessing widget outside the class
    By santosh.kumar in forum Qt Programming
    Replies: 6
    Last Post: 18th May 2007, 12:57
  4. Accessing to a static variable from the same class
    By xgoan in forum General Programming
    Replies: 6
    Last Post: 5th March 2007, 10:50
  5. accessing my own class-instances
    By mikro in forum Newbie
    Replies: 3
    Last Post: 11th July 2006, 00:10

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.