Page 2 of 2 FirstFirst 12
Results 21 to 23 of 23

Thread: How to access the UI from another class ?

  1. #21
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to access the UI from another class ?

    Aside from the fact that it is not very customary to send a QWidget pointer via a signal, the standard rules for signal/slot connects apply:

    You need to have access to both the sender and the receiver pointer at the place where you put the connect.

    So what good would a "dummy object" do?

    Forget about Qt or signal/slots until you have a place where you have access to both pointers.
    Basic C++.

    Cheers,
    _

  2. #22
    Join Date
    Jul 2016
    Posts
    4
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Windows Android

    Default Re: How to access the UI from another class ?

    No help available ??

  3. #23
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to access the UI from another class ?

    There are plenty of C++ tutorials online, some of them should cover object creation, passing data through methods, storing data in variable and members.

    Cheers,
    _

Similar Threads

  1. cannot access QLineEdit text in other methods of the class...
    By Leoha_Zveri in forum Qt Programming
    Replies: 2
    Last Post: 29th September 2009, 12:07
  2. Problem with QDialog class
    By sudheer168 in forum Qt Programming
    Replies: 4
    Last Post: 23rd December 2008, 09:03
  3. class QHBoxLayout
    By csvivek in forum Installation and Deployment
    Replies: 2
    Last Post: 10th April 2008, 07:57
  4. Replies: 4
    Last Post: 26th June 2007, 19:19
  5. Replies: 5
    Last Post: 14th July 2006, 22:42

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.