Results 1 to 2 of 2

Thread: How to give mythread.cpp access to UI (the one in mainwindow.cpp)?

  1. #1
    Join Date
    Mar 2013
    Posts
    5
    Thanks
    1
    Thanked 4 Times in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default How to give mythread.cpp access to UI (the one in mainwindow.cpp)?

    I tried following this: http://stackoverflow.com/questions/1...to-uis-widgets but it didn't work (I still had the same compiling errors as if I had done nothing)

    Here is my project in a zip file: https://mega.co.nz/#!2xBhHRgI!aBK8JF...TieA7QcSxryLSA

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to give mythread.cpp access to UI (the one in mainwindow.cpp)?

    I do not propose to agree to the TOS of some random site to download and debug your entire program for you.

    There's no magic just basic C++. If you want to access data from an object you need to provide an access function of some sort. If, as it would appear, you are accessing data from another thread then you must be very careful about synchronisation of readers and writers.

Similar Threads

  1. how can dialog access variable from parent MainWindow?
    By krezix in forum Qt Programming
    Replies: 5
    Last Post: 30th April 2012, 00:20
  2. Replies: 3
    Last Post: 12th April 2011, 10:58
  3. Replies: 4
    Last Post: 17th January 2011, 14:05
  4. Replies: 5
    Last Post: 7th November 2007, 14:46
  5. How to access MainWindow objects.
    By Doug Broadwell in forum Newbie
    Replies: 1
    Last Post: 3rd November 2006, 10:03

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.