LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-06-2012, 06:25 AM   #1
edbarx
Member
 
Registered: Sep 2010
Distribution: Used Debian since Sarge. (~2005)
Posts: 373

Rep: Reputation: 21
Need a book to learn using widget properties in kdevelop


Hi,

I need a book to learn how to use widget properties in kdevelop (c++). I studied c/c++ but I couldn't find a decent introduction as to how widget properties could be used. Previously, I programmed in Object Pascal and to access a property I would have done something like this:

Code:
objectinstance.property := 2;
a := objectinstance.property;

Thanks for any help.
 
Old 05-06-2012, 11:10 AM   #2
edbarx
Member
 
Registered: Sep 2010
Distribution: Used Debian since Sarge. (~2005)
Posts: 373

Original Poster
Rep: Reputation: 21
Is it possible that Nobody knows of a suitable book! I am not a student and I am not studying at an institution. How can I know that any book I buy is suitable for the purpose I want?!

Please, make your suggestions. If you studied at an institution it should be more than easy for you to suggest a book, but definitely not for anyone like me who hasn't.
 
Old 05-06-2012, 12:09 PM   #3
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 10,118

Rep: Reputation: 4687Reputation: 4687Reputation: 4687Reputation: 4687Reputation: 4687Reputation: 4687Reputation: 4687Reputation: 4687Reputation: 4687Reputation: 4687Reputation: 4687
I didn't understand the question, and no-one else did did either. What are these "widgets" that you're talking about? If they're user interface elements, then which GUI toolkit (GTK? QT?) are you using? If you're writing your own classes and trying to implement getters and setters, then that's something else entirely.

BTW, BUMP posts are against the rules here. Yours was particularly unreasonable. I have my time zone set correctly, so I see that your first post was posted at 4:25am (my time) and the second at 9:10am (my time). Therefore, it's very possible that no-one saw this thread in the only 5 hours between your first post and the time you bumped it.

Last edited by dugan; 05-06-2012 at 01:48 PM.
 
Old 05-06-2012, 02:18 PM   #4
edbarx
Member
 
Registered: Sep 2010
Distribution: Used Debian since Sarge. (~2005)
Posts: 373

Original Poster
Rep: Reputation: 21
I beg the board's admins' pardon for inadvertently violating any rules.

In my first post, I was referring to user interface elements. These are buttons, menus, edit boxes, list boxes, etc. Those were referred to as widgets and I am completely at loss using them notwithstanding that I successfully programmed a long expresssion evaluating class in c++. I can program for the CLI using command line parameters but I would like also to extend my ability further to use graphical programs as well. I have been doing this for years using Delphi (object pascal) but appartently, the originators of c++'s widgets decided to use some unimaginable way to set/retrieve the values of widget properties.

I am posting a code snippet to give an idea as to which toolkit I would like to use:
Code:
KConfigDialog *dialog = new KConfigDialog(this, "settings", Settings::self());
    QWidget *generalSettingsDlg = new QWidget;
    ui_prefs_base.setupUi(generalSettingsDlg);
    dialog->addPage(generalSettingsDlg, i18n("General"), "package_setting");
    connect(dialog, SIGNAL(settingsChanged(QString)), m_view, SLOT(settingsChanged()));
    dialog->setAttribute( Qt::WA_DeleteOnClose );
    dialog->show();
Code:
#ifndef MYSECONDVIEW_H
#define MYSECONDVIEW_H

#include <QtGui/QWidget>
 
Old 05-06-2012, 03:02 PM   #5
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 10,118

Rep: Reputation: 4687Reputation: 4687Reputation: 4687Reputation: 4687Reputation: 4687Reputation: 4687Reputation: 4687Reputation: 4687Reputation: 4687Reputation: 4687Reputation: 4687
Qt then. I'm surprised that you didn't name it.

Here is the documentation for Qt's property system (focusing on how to declare new properties):
http://qt-project.org/doc/properties.html

The definitive Qt book (well, after the online documentation) is Mark Summerfield's C++ GUI Programming With Qt 4, which you can legally download for free:
http://dcsoft.wordpress.com/2010/01/...prentice-hall/

As for how to set and retrieve the values of these properties, it's simple and certainly not "unimaginable":

Code:
QLabel *label = new QLabel(this);
label->setText(tr('Blargh')); // Set the text property
QString text = label->text(); // Read the text property

Last edited by dugan; 05-06-2012 at 03:17 PM.
 
Old 05-06-2012, 04:29 PM   #6
edbarx
Member
 
Registered: Sep 2010
Distribution: Used Debian since Sarge. (~2005)
Posts: 373

Original Poster
Rep: Reputation: 21
Thanks for the link. I downloaded the .chm file and converted it into a .pdf file.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
book to learn Python icecubeflower Linux - Newbie 4 03-31-2009 08:18 AM
Python / Glade / GTK problem with accessing widget properties merville Programming 0 11-22-2007 08:23 PM
LXer: New Book on KDevelop LXer Syndicated Linux News 0 04-17-2007 08:01 AM
best book to learn on?? RahJiggah Linux - Newbie 4 07-08-2004 02:52 AM
kdevelop book KsA Linux - Software 3 01-24-2004 12:15 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration