I am trying to get started with QT GUIs and went through a hello world program. Added QFileDialog and a Quit button. I then wanted to use the filename from QFileDialog as my video file source and display a video. Came across Phonon in QT help to display videos and was trying to add a video player when I started getting the ":: error: collect2: ld returned 1 exit status" error.
I would appreciate if someone can help me understand what I am doing wrong. Also, suggestion based on best practices as to where I should place the Videoplayer declaration/definition would be appreciated.
What I noticed was if I limit the Videoplayer line to just the player declaration, that is:
I don't get this error. Certainly its something simple and conceptual I am missing...
hello::hello(QWidget *parent) :
Phonon::VideoPlayer *player = new Phonon::VideoPlayer(Phonon::VideoCategory,this);
path = QFileDialog::getOpenFileName(this,"Open file...","/","Video(*.avi);All Files(*.*)");