By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,917 Members | 1,287 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,917 IT Pros & Developers. It's quick & easy.

GUI in C++?

P: n/a
I would like to write a GUI in C++. I would like to write a very
minimalistic movie database which basically just shows the content of a txt
files that contains the titles, genres and ID of the movies. As a minimum it
should be possible to sort by genre and title and print the list in pdf.

Since I already have the txt file it should be possible to read txt files
with the content. For this very basic implementation I guess it would be
overkill to use MySql or some other opensource DB.

Are there any frameworks,api's, classes, tutorials for C++ that is relevant
for this kind of project?

I guess if I write it with the GNU g++ compiler it will only run in linux.
But is there someway to write c++ code that can be compiled for both OS's?

Johs
Dec 17 '06 #1
Share this Question
Share on Google+
18 Replies


P: n/a

Johs wrote:
I would like to write a GUI in C++. I would like to write a very
minimalistic movie database which basically just shows the content of a txt
files that contains the titles, genres and ID of the movies. As a minimum it
should be possible to sort by genre and title and print the list in pdf.

Since I already have the txt file it should be possible to read txt files
with the content. For this very basic implementation I guess it would be
overkill to use MySql or some other opensource DB.

Are there any frameworks,api's, classes, tutorials for C++ that is relevant
for this kind of project?
Yes. Many. See e.g.

http://en.wikipedia.org/wiki/Widget_toolkit

Mirek

Dec 17 '06 #2

P: n/a
Johs wrote:
I would like to write a GUI in C++. I would like to write a very
minimalistic movie database which basically just shows the content of a
txt files that contains the titles, genres and ID of the movies. As a
minimum it should be possible to sort by genre and title and print the
list in pdf.

Since I already have the txt file it should be possible to read txt files
with the content. For this very basic implementation I guess it would be
overkill to use MySql or some other opensource DB.

Are there any frameworks,api's, classes, tutorials for C++ that is
relevant for this kind of project?

I guess if I write it with the GNU g++ compiler it will only run in linux.
But is there someway to write c++ code that can be compiled for both OS's?

Johs
You certainly can write cross-platform GUI code in C++ using GNU GCC. For
example:
http://www.mozilla.org/

Here's something else to look at:

http://cartan.cas.suffolk.edu/moin/OopDocbook
--
NOUN:1. Money or property bequeathed to another by will. 2. Something handed
down from an ancestor or a predecessor or from the past: a legacy of
religious freedom. ETYMOLOGY: MidE legacie, office of a deputy, from OF,
from ML legatia, from L legare, to depute, bequeath. www.bartleby.com/61/
Dec 17 '06 #3

P: n/a
Johs wrote:
I would like to write a GUI in C++. I would like to write a very
minimalistic movie database which basically just shows the content of a
txt files that contains the titles, genres and ID of the movies. As a
minimum it should be possible to sort by genre and title and print the
list in pdf.
I could do that in 5~10 hours with a website framework, or 5~10 days in C++
with one of its GUI toolkits. And I have 5 times the experience with C++.

Why are you using a hard language to write a soft application?

--
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
Dec 17 '06 #4

P: n/a
Phlip wrote:
Johs wrote:
>I would like to write a GUI in C++. I would like to write a very
minimalistic movie database which basically just shows the content of a
txt files that contains the titles, genres and ID of the movies. As a
minimum it should be possible to sort by genre and title and print the
list in pdf.

I could do that in 5~10 hours with a website framework, or 5~10 days in
C++ with one of its GUI toolkits. And I have 5 times the experience with
C++.
I could do it in 5~10 hours - easy - with Qt, and that includes data entry,
which was not even listed as a requirement.
Why are you using a hard language to write a soft application?
Why swat flies with sledge hammers?

--
NOUN:1. Money or property bequeathed to another by will. 2. Something handed
down from an ancestor or a predecessor or from the past: a legacy of
religious freedom. ETYMOLOGY: MidE legacie, office of a deputy, from OF,
from ML legatia, from L legare, to depute, bequeath. www.bartleby.com/61/
Dec 18 '06 #5

P: n/a
I think wxWidget will meet u need.
See http://www.wxwidgets.org
"Johs д
"
I would like to write a GUI in C++. I would like to write a very
minimalistic movie database which basically just shows the content of a txt
files that contains the titles, genres and ID of the movies. As a minimumit
should be possible to sort by genre and title and print the list in pdf.

Since I already have the txt file it should be possible to read txt files
with the content. For this very basic implementation I guess it would be
overkill to use MySql or some other opensource DB.

Are there any frameworks,api's, classes, tutorials for C++ that is relevant
for this kind of project?

I guess if I write it with the GNU g++ compiler it will only run in linux.
But is there someway to write c++ code that can be compiled for both OS's?

Johs
Dec 18 '06 #6

P: n/a
If you are going to use a cross platform framework for C++ GUI's I
defiantly suggest using Trolltech's QT lib (http://www.trolltech.com/)

this will save your life !

if you want to develop a free one using the WIN32 SDK you can download
it from microsoft's visual studio 2005 express edition.

Dec 18 '06 #7

P: n/a
Steven T. Hatton wrote:
>I could do that in 5~10 hours with a website framework, or 5~10 days in
C++ with one of its GUI toolkits. And I have 5 times the experience with
C++.

I could do it in 5~10 hours - easy - with Qt, and that includes data
entry,
which was not even listed as a requirement.
That would be if you have memorized lots of its identifiers. I was thinking
WTL or wxWidgets.

And, yet, Qt isn't really C++, it's C++ and moc!
>Why are you using a hard language to write a soft application?

Why swat flies with sledge hammers?
Uh, to make them dead? ;-)

--
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
Dec 18 '06 #8

P: n/a

Johs wrote:
I guess if I write it with the GNU g++ compiler it will only run in linux.
Not at all. gcc can compile for an astonishing range of microprocessors
and operating systems. All of Mac OS X is compiled on gcc, and I use a
variant of it called mingw to compile on Windoze. I also use gcc to
compile code for microcontrollers. gcc is definitely not a Linux-only
compiler. In fact, the GNU people would probably lynch you for saying
so.

(n.b.: g++ is part of the gcc project, and with few exceptions, targets
the same systems. See http://gcc.gnu.org/.)
But is there someway to write c++ code that can be compiled for both OS's?
>From your perspective, yes, absolutely. As mentioned here, there are
many portable toolkits, like Qt, wxWindows, JUCE (a personal
favourite), etc.

--mpa

Dec 18 '06 #9

P: n/a
Phlip wrote:
Steven T. Hatton wrote:
>>I could do that in 5~10 hours with a website framework, or 5~10 days in
C++ with one of its GUI toolkits. And I have 5 times the experience with
C++.

I could do it in 5~10 hours - easy - with Qt, and that includes data
entry,
which was not even listed as a requirement.

That would be if you have memorized lots of its identifiers.
Experience does help, but I don't think the proposed project would be any
easier using a web server than using Qt for a person starting from scratch.
The Qt documentation really is professionally done, and they provide many
examples.
I was
thinking WTL or wxWidgets.

And, yet, Qt isn't really C++, it's C++ and moc!
All the moc does is generate C++ code. Beyond this, we are going off topic
for c.l.c++.
>>Why are you using a hard language to write a soft application?

Why swat flies with sledge hammers?

Uh, to make them dead? ;-)
If you don't mind the holes in the wall. ;-)

--
NOUN:1. Money or property bequeathed to another by will. 2. Something handed
down from an ancestor or a predecessor or from the past: a legacy of
religious freedom. ETYMOLOGY: MidE legacie, office of a deputy, from OF,
from ML legatia, from L legare, to depute, bequeath. www.bartleby.com/61/
Dec 18 '06 #10

P: n/a

Steven T. Hatton wrote:
Phlip wrote:
Johs wrote:
I would like to write a GUI in C++. I would like to write a very
minimalistic movie database which basically just shows the content of a
txt files that contains the titles, genres and ID of the movies. As a
minimum it should be possible to sort by genre and title and print the
list in pdf.
I could do that in 5~10 hours with a website framework, or 5~10 days in
C++ with one of its GUI toolkits. And I have 5 times the experience with
C++.

I could do it in 5~10 hours - easy - with Qt, and that includes data entry,
which was not even listed as a requirement.
[ranting mode on]
Or in 2~3 hours with U++. And that includes designing of application
icon too :)
[ranting mode off]

Mirek

Dec 18 '06 #11

P: n/a

Johs wrote:
I would like to write a GUI in C++. I would like to write a very
minimalistic movie database which basically just shows the content of a txt
files that contains the titles, genres and ID of the movies. As a minimum it
should be possible to sort by genre and title and print the list in pdf.

Since I already have the txt file it should be possible to read txt files
with the content. For this very basic implementation I guess it would be
overkill to use MySql or some other opensource DB.

Are there any frameworks,api's, classes, tutorials for C++ that is relevant
for this kind of project?

I guess if I write it with the GNU g++ compiler it will only run in linux.
But is there someway to write c++ code that can be compiled for both OS's?

Johs
Qt chapter 11-12 :-D
it's qmake not g++ for compilation :-D

Dec 18 '06 #12

P: n/a
Johs wrote:
I would like to write a GUI in C++.
Maybe Santa will bring you a C++ GUI Programming Guide for Christmas.
Dec 18 '06 #13

P: n/a
Peter Liu wrote:
>
Johs wrote:
>I would like to write a GUI in C++. I would like to write a very
minimalistic movie database which basically just shows the content of a
txt files that contains the titles, genres and ID of the movies. As a
minimum it should be possible to sort by genre and title and print the
list in pdf.

Since I already have the txt file it should be possible to read txt files
with the content. For this very basic implementation I guess it would be
overkill to use MySql or some other opensource DB.

Are there any frameworks,api's, classes, tutorials for C++ that is
relevant for this kind of project?

I guess if I write it with the GNU g++ compiler it will only run in
linux. But is there someway to write c++ code that can be compiled for
both OS's?

Johs

Qt chapter 11-12 :-D
it's qmake not g++ for compilation :-D
qmake is a make management tool which works in conjunction with make. This
is really heading off topic, but I have to correct such dysinformation
before it is assumed to be true. qmake serves a function similar to that
of autotools but is much, much, much easier to use. Furthermore, it
integrates with autotools if you really have a lust for complexity. qmake
create standard Makefiles for a project, and helps keep them up to date.

Qt does use some pre-processing technology with the moc in order to produce
pure standard C++ which is the _only_ programming language handed to the
compiler _of_ _your_ _choice_ (including g++) in a typical use of Qt. moc
is like Cpp with a brain.
--
NOUN:1. Money or property bequeathed to another by will. 2. Something handed
down from an ancestor or a predecessor or from the past: a legacy of
religious freedom. ETYMOLOGY: MidE legacie, office of a deputy, from OF,
from ML legatia, from L legare, to depute, bequeath. www.bartleby.com/61/
Dec 18 '06 #14

P: n/a
Qt does use some pre-processing technology with the moc in order to produce
pure standard C++ which is the _only_ programming language handed to the
compiler _of_ _your_ _choice_ (including g++) in a typical use of Qt. moc
is like Cpp with a brain.
Sorry, but this is hard to resist:

Original C++ compiler (Cfront) used some pre-processing technology
(that involved parsing C++ etc...) to produce pure standard C which was
the _only_ programming language handed to the C compiler _of_ _your_
_choice_....

moc does not make Qt less useful. But I think the result should be
considered at least a C++ dialect, because it provides some new
language constructs.

Mirek

Dec 18 '06 #15

P: n/a
Ron Natalie wrote:
Johs wrote:
>I would like to write a GUI in C++.

Maybe Santa will bring you a C++ GUI Programming Guide for Christmas.
Only if he buys a Mac, apparently.
Dec 18 '06 #16

P: n/a
"Steven T. Hatton" <ch********@germania.supwrites:

qmake is a make management tool which works in conjunction with make. This
is really heading off topic, but I have to correct such dysinformation
before it is assumed to be true.


I am glad someone takes the responsibility to answer the madness.
--
espen
Dec 18 '06 #17

P: n/a
Espen Myrland wrote:
"Steven T. Hatton" <ch********@germania.supwrites:

>qmake is a make management tool which works in conjunction with make.
This is really heading off topic, but I have to correct such
dysinformation before it is assumed to be true.

I am glad someone takes the responsibility to answer the madness.

Back atcha! ;)
--
NOUN:1. Money or property bequeathed to another by will. 2. Something handed
down from an ancestor or a predecessor or from the past: a legacy of
religious freedom. ETYMOLOGY: MidE legacie, office of a deputy, from OF,
from ML legatia, from L legare, to depute, bequeath. www.bartleby.com/61/
Dec 18 '06 #18

P: n/a
Johs napisa(a):
I would like to write a GUI in C++. I would like to write a very
minimalistic movie database which basically just shows the content of a txt
files that contains the titles, genres and ID of the movies. As a minimum it
should be possible to sort by genre and title and print the list in pdf.

Since I already have the txt file it should be possible to read txt files
with the content. For this very basic implementation I guess it would be
overkill to use MySql or some other opensource DB.

Are there any frameworks,api's, classes, tutorials for C++ that is relevant
for this kind of project?

I guess if I write it with the GNU g++ compiler it will only run in linux.
But is there someway to write c++ code that can be compiled for both OS's?

Johs
See www.ultimatepp.org. Portable (linux, win32, wince), modern and very
simple in use. Works perfectly with GNU g++ compiler.
Dec 20 '06 #19

This discussion thread is closed

Replies have been disabled for this discussion.