LinuxQuestions.org
Help answer threads with 0 replies.
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-16-2008, 11:02 PM   #1
MystikMitch
Member
 
Registered: Aug 2003
Location: NYC
Posts: 41
Blog Entries: 6

Rep: Reputation: 15
Learning to master GUI with C++ / C ?


Hello,

How does one program in linux with a GUI? I have read / seen and had some interest in C/ C++. Think is the language is not truly a "gui" language.

How does one plug it in with GUI frontends:

Glade/ GTK
Qt / Qdevelop / kdevelop
so on ....

Don't the above QT / GTK most used toolkits have their own "objects" ?

Looking at a standard C / C++ and the language with a GUI toolkit is scary!

So basically how does one use the skills they use in a none object oriented language with now objects from toolkits?

Fail to understand that.

Say C# / VB.net has generally one thing to master. All under one IDE, one ahem.. large framework. Thanks.
 
Old 05-16-2008, 11:45 PM   #2
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,376

Rep: Reputation: 147Reputation: 147
I'm not entirely clear on what you are asking. However let me explain a little about Qt, since I use it a little.

Qt is an application framework that supports GUI development
The underlying language of Qt is C++
So Qt provides you with the core classes to help you develop your application
However, Qt does not provide you with the code editor, debugger, version control etc., but these can be easily obtained by selected an IDE, for example KDevelop, (or even QDevelop a cross platform IDE developed using Qt specifically for Qt development).

The combination of these tools will give you a powerful development environment, the beauty of it is that you are not tied into any specific tool, so if (for example) you decide that KDevelop is not the IDE for you then try Eclipse, the rest of your tool chain will still work.

Development under the Windows tools is not so very different (although I can't specifically talk about .Net having never used it), you have an editor, you save the code, you use help files to understand which classes and methods you need to use, you compile it, you link it, you run it, you debug it, you profile the code for areas to optimise. The process is essentially the same.
 
Old 05-17-2008, 11:12 PM   #3
MystikMitch
Member
 
Registered: Aug 2003
Location: NYC
Posts: 41
Blog Entries: 6

Original Poster
Rep: Reputation: 15
Thanks for the answer,

But what I meant is when one learns on Windows. Generally one is learning one IDE. How to use the code within that IDE. Say VB.NET is VB.NET and C#.NET is C#.NET with GUI and all. I understand the shortcomings. In having a single IDE / technologyto work with. But not what i meant. Meant that VB.NET generally does not have two things to learn. Maybe just seems that way but here one learns say C / C++ / Python / "insert language here", and has to learn again to use the toolkit. More confused how would one apply say A hello world from no GUI C++, next to a hello world in C++ / GTK or C++ / QT or C++ / toolkit of choice. One now has to learn the toolkit to be used with the given language.

For a starter it is like "Should i learn C++" ? Or C++ + toolkit? I know a toolkit is just that visual GUI objects not any language it wraps around a language and so. What was able to understand at least in the MS windows land. One can write a console app but it is still within the one thing approach. In Linux land one has a strictly say a C++ no Gui. If one needs a "GUI" they can use for respective desktop QT/ Gnome / "insert here." So confused of learning now the language. Next learning how to say speak with C++ and the objects. Can someone write a few line "Hello world" in C++ (Console) next C++ / GTK and last C++ / QT. To see how it differs. The sytax that remains when going from toolkit to toolkit. I have some experience with VB on the basic interpreter. My head has become dilluted because of early exposure to the Basic interpreter within the vb-3-.NET IDE.


Quote:
Originally Posted by graemef View Post
I'm not entirely clear on what you are asking. However let me explain a little about Qt, since I use it a little.

Qt is an application framework that supports GUI development
The underlying language of Qt is C++
So Qt provides you with the core classes to help you develop your application
However, Qt does not provide you with the code editor, debugger, version control etc., but these can be easily obtained by selected an IDE, for example KDevelop, (or even QDevelop a cross platform IDE developed using Qt specifically for Qt development).

The combination of these tools will give you a powerful development environment, the beauty of it is that you are not tied into any specific tool, so if (for example) you decide that KDevelop is not the IDE for you then try Eclipse, the rest of your tool chain will still work.

Development under the Windows tools is not so very different (although I can't specifically talk about .Net having never used it), you have an editor, you save the code, you use help files to understand which classes and methods you need to use, you compile it, you link it, you run it, you debug it, you profile the code for areas to optimise. The process is essentially the same.

Last edited by MystikMitch; 05-17-2008 at 11:31 PM.
 
Old 05-18-2008, 02:17 AM   #4
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Quote:
Originally Posted by MystikMitch View Post
Maybe just seems that way but here one learns say C / C++ / Python / "insert language here", and has to learn again to use the toolkit.
Well yes, because those languages are designed as general purpose programming languages. If you want to write more "advanced" applications, then you're going to need to use (and hence learn the details of) external libraries. Edit: this is not specific to Linux.

Quote:
More confused how would one apply say A hello world from no GUI C++, next to a hello world in C++ / GTK or C++ / QT or C++ / toolkit of choice.
I don't understand what you mean by "next to" in this context.

Quote:
For a starter it is like "Should i learn C++" ? Or C++ + toolkit?
Well, you'd need to learn the language first.

Quote:
So confused of learning now the language.
I don't really understand why. Once you learn the concepts (usually though, the concepts are generic - I mean they are applicable to many languages) and syntax of a given language, you should be able to learn how to make use of libraries and so on.

Last edited by Nylex; 05-18-2008 at 02:38 AM.
 
Old 05-19-2008, 07:11 AM   #5
MystikMitch
Member
 
Registered: Aug 2003
Location: NYC
Posts: 41
Blog Entries: 6

Original Poster
Rep: Reputation: 15
Thank You,

I was able to think through and make sense of some of this. Concept similiar the only difference is how it is presented. Nevermind I got it from sample the style is similar.

Codes:

Code:
 {
    g_print ("Hello World\n");
}

Code:
/* Hello World program */

#include<stdio.h>

main()
{
    printf("Hello World");
}




Quote:
Originally Posted by Nylex View Post
Well yes, because those languages are designed as general purpose programming languages. If you want to write more "advanced" applications, then you're going to need to use (and hence learn the details of) external libraries. Edit: this is not specific to Linux.



I don't understand what you mean by "next to" in this context.



Well, you'd need to learn the language first.



I don't really understand why. Once you learn the concepts (usually though, the concepts are generic - I mean they are applicable to many languages) and syntax of a given language, you should be able to learn how to make use of libraries and so on.

Last edited by MystikMitch; 05-19-2008 at 10:39 AM.
 
  


Reply

Tags
basics, beginners


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
Learning Command-Line/No GUI HighPingDrifter Linux - General 8 02-23-2008 07:57 AM
Mandriva (HP zv5420) volume keys control master mono, NOT MASTER! about36ninjas Linux - Laptop and Netbook 10 12-30-2007 12:59 AM
LXer: Setting Up Master-Master Replication With MySQL 5 On Debian Etch LXer Syndicated Linux News 0 10-25-2007 10:42 PM
LXer: Master iptables with GUI Firewall Builders LXer Syndicated Linux News 0 02-14-2006 03:46 PM
The 'GUI' learning curve... tcritchell Programming 5 10-15-2001 11:07 AM


All times are GMT -5. The time now is 03:44 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration