Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3323920
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:21:36+00:00 2026-05-17T23:21:36+00:00

I am developing image aquisition software. I want to run display function in a

  • 0

I am developing image aquisition software. I want to run display function in a separate thread (to ensure live view for easy image capture). For now I am subclassing QObject, creating DisplayObject and using QThread::moveToThread function. Problem is that DisplayObject has to interact with GUI (images need to be displayed in QGraphicsView objects). What is the best (and the most elegant) way to do this?

My current solution:

class DisplayObject : public QObject
{
    Q_OBJECT
    public:
        inline void addDetectorSystem(cci::PGR* system);
        inline void connectGui(ImageAquisition* gui);

    public slots:
        void display();

    private:
        cci::PGR* camSystem;
        ImageAquisition* guiClass;
};

DisplayObject is initialized as below:

  DisplayObject Displayer;
        Displayer.addDetectorSystem(PGRSystem);
        Displayer.connectGui(this);
        QThread thread;
        Displayer.moveToThread(&thread);
        connect(this, SIGNAL(display()), &Displayer, SLOT(display()));
        thread.start();

I forgot to admit, that it doesn’t work…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T23:21:36+00:00Added an answer on May 17, 2026 at 11:21 pm

    You can use QImage in non-UI threads. This would allow you to do your capture/drawing to an image. Once an image is ready to be displayed, you could then emit a signal with the image. Your UI element should have a slot connected to that signal which takes the given image and refreshes itself to draw that image.

    By using signals and slots, the data should be transferred in a thread-safe manner. By using QImages in the other threads, you can draw, and the main UI is only responsible for updating the created images, instead of spending a lot of time processing them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing some image processing software in C++ on Intel which has to run
I am developing image redraw app. i know the center of one image view
Iam developing one application.In that iam using one uiimageview.And take another image view and
In an iPhone application I'm developing I have a Image View that displays eyes
Hi Iam developing an image viewer application just like irfan-view or acdsee which should
I am developing an Image Gallery using scrollview. I want to know can I
im developing a webbapp wich receives image resources from users, but i want to
Hi developing an image album using the android gallery and gridview tutorials I want
I'm developing a Win CE 6 OS image and want to make it fit
Im developing an Application.My requirement is to display the Image and String(Title and Subtitle).

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.