Skip navigation.
Home
The QNX Community Portal

View topic - Derive a custom widget from existing widget

Derive a custom widget from existing widget

Isn't the name clear?

Derive a custom widget from existing widget

Postby ban » Thu Aug 28, 2008 10:19 am

:)
Hi All, I am a new user to the PhAB.
I just want to inherit one of the existing widget (say PtRect) to create my own custom widget, like in C++ class inheritance,

Class myRectWidget : Public PtRect
{
//My Additional functionality
}

Can i do so? If yes then How?

Any weblink or the procedure will be appericated.
ban
New Member
 
Posts: 6
Joined: Thu Aug 28, 2008 10:09 am

RE: Derive a custom widget from existing widget

Postby mario » Thu Aug 28, 2008 11:32 am

No you can't do this in C++, however someone wrote a C++ wrapper around the Photon lib. It's been a while though, don't remember the name, google is your friend.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

RE: Derive a custom widget from existing widget

Postby maschoen » Thu Aug 28, 2008 2:15 pm

Mario,

He said, "like in C++" for which the answer is YES. You can't program it in C++, but you can build a new widget on top of an older one. If you look at the Widget documentation, it is obvious that the internal structure of widgets allows this.

Mitchell
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm


Return to GUI Programming

Who is online

Users browsing this forum: No registered users and 4 guests

cron