ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am programming a small app in Qt 4 and I am looking for a way to send data from a dialog..
I have a widget within the mainwindow which opens up a dialog, within the dialog the user is asked to input some data and then the user is supposed to press the Add-button. Now, when this button is pressed the dialog should close and the calling widget should take care of all the data the user gave the dialog and process it.
So my question is: how can I make the dialog send the data to the calling widget / make the calling widget fetch the data from the dialog?
I have connected the button to my own slot called saveAndClose().. This slot will check all QLineEdit and issue a warning if any of them are empty.. but whenever I try to access the text within a lineedit I get a seg fault..
I fixed the problem by connecting the lineedit signal textChanged to update m_name and then use that one instead in the saveAndClose() slot.
But I have a new problem. Now I want the dialog to fetch a QStringList from the calling widget..
I tried to do this in the calling widget
list << "Item1";
list << "Second item";
int ret = dialog.exec();
But it seems that after dialog.exec() gets called the internal property (QStringList m_list) gets cleared. Before I call dialog.exec I can call dialog.list() and I will get back my two strings. But in the constructor of the dialog the QStringList is empty..