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 6185999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:48:46+00:00 2026-05-24T01:48:46+00:00

I am new in C++ and working on a project with QT. I created

  • 0

I am new in C++ and working on a project with QT. I created a header file called imageconvert.h which is as follow:

class ImageConvert
{

private:
IplImage *imgHeader;
uchar* newdata;

public:

ImageConvert();
~ImageConvert();
IplImage* QImage2IplImage(QImage *qimg);
QImage* IplImage2QImage(IplImage *iplImg);
};

also I defined those public methods in imageconvert.cpp file.

Now, I want to call QImage2IplImage and IplImage2QImage from other cpp file. So i include imageconvert.h in that CPP file and called those two functions.

it gives the the following errors:

error: 'QImage2IplImage' was not declared in this scope
error: 'IplImage2QImage' was not declared in this scope

Any help would be greatly appreciated.

  • 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-24T01:48:47+00:00Added an answer on May 24, 2026 at 1:48 am

    The functions you’ve defined are member functions of the ImageConvert class. You need an instance of that class to be able to call them.

    Something like:

    ImageConvert ic;
    ic.QImage2IplImage(your_QImage_object);
    

    If you don’t need state to do the conversion, you should make those helper functions static. Then you can call them with:

    ImageConvert::QImage2IplImage(your_QImage_object);
    

    without first creating an instance of ImageConvert. But please note that you will not be able to use imgHeader or newData in those static functions – they are member variables, only usable within an instance of that class.

    You could also remove these functions from your class and put them in a namespace.

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

Sidebar

Related Questions

I'm working on a new project http://www.hotwirerevealed.com which reveals / identifies hotels on hotwire.com.
New to working with Visual Studio Solutions. I normally place my Site Class file
I created client from wsdl file using visual studio 2010 Pro, created new project,
I'm working on my first homework project in a web programming class, which is
I'm working on a new project and for some reason decided to create two
I'm working on a project that uses the new CSS3 transform:rotate(180deg) feature. Every modern
i am working inapp-purchase project and first time for creating inapp-purchase in new app
I'm working on this project and I have to open a new browser tab.
I am new to JSF, I am working on web project. I want to
I am working on a new project for a client; they have supplied the

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.