Instantiate a KMediaPlayer - KDE

This is a discussion on Instantiate a KMediaPlayer - KDE ; Hey all, I am trying to instantiate or inherit a KMediaPlayer object in C++ code. I have looked high and low for an example of how to do this, but cannot find one. I tried class MyPlayer : public KMediaPlayer ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Instantiate a KMediaPlayer

  1. Instantiate a KMediaPlayer

    Hey all,

    I am trying to instantiate or inherit a KMediaPlayer object in C++ code.
    I have looked high and low for an example of how to do this, but cannot
    find one.

    I tried

    class MyPlayer : public KMediaPlayer
    {
    QOBJECT
    public:
    MyPlayer();:
    ~MyPlayer();
    }

    But that simply gave error of "Cannot find matching default constructor
    choices are:" and no matter what I put there I got erros referencing the
    item.

    The methods pause, play, stop, etc are all pure virtual and must be
    defined as well.

    I just don't get it!

    Thanks in advance.

  2. Re: Instantiate a KMediaPlayer

    "Eldon Hiebert" <""ehiebert\"@NOSPAM@dccnet.com"> wrote in message
    news:12169luos9rdi8d@corp.supernews.com...
    > Hey all,
    >
    > I am trying to instantiate or inherit a KMediaPlayer object in C++ code. I
    > have looked high and low for an example of how to do this, but cannot find
    > one.
    >
    > I tried
    >


    it's been a long time since I programmed in C++ but ...

    > class MyPlayer : public KMediaPlayer
    > {
    > QOBJECT
    > public:
    > MyPlayer();:


    .... the ending colon looks wrong to me.


    > ~MyPlayer();
    > }
    >


    --
    Geoff



+ Reply to Thread