Solved

QT and KDE prob

Posted on 2003-11-03
4
292 Views
Last Modified: 2010-04-22
This will be very hard to explain but i will try anyway

i have a project called test .....it has test.cpp test.h & update.cpp update.h ....i created a QT dialog that displays on startup, this works fine.....i have added QlineEdit box and a pushButton. In test.cpp when i press the pushButton i can succesfully add text to the lineEdit1 ..using lineEdit1->setText ("wow it worked"); ......but i want a class form update.cpp to be able to add the text to lineEdit1 but it fails with update.cpp:35: error: `lineEdit1' undeclared (first use this function).

the easiest way is to download the project from here and it should all make sense than ;-)
http://www.nutterx.com/download/

it was made with Kdevelop 2.1

Thanks

0
Comment
Question by:nutterx
4 Comments
 
LVL 3

Accepted Solution

by:
guynumber5764 earned 340 total points
ID: 9676711
The declaration of lineEdit1 (as a QLineEdit *)  and it's new/delete seem to have gotten lost in the shuffle.  It'll have to be public if you want update to see it and, even then it'll have to be explicitely scoped (::).
0
 

Expert Comment

by:probine
ID: 9911897
I think you could use pointers. So the update class will have a pointer to the QT edit box.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to pass an array to a shell script? 5 169
Linux daemon 11 353
Debian 3 - initrd rebuild 3 69
Linux: disable vim auto-comment 7 95
Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now