Results 1 to 5 of 5

Thread: Offline flash video

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2009
    Posts
    4
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Offline flash video

    Hi,

    I've a strange (everyone said me this) problem.

    This is my main.cpp

    Qt Code:
    1. #include <QtGui/QApplication>
    2. #include <QWidget>
    3. #include <QtWebKit>
    4. #include <QWebSettings>
    5. #include <QWebView>
    6. #include <QVBoxLayout>
    7. #include <QUrl>
    8. #include <QtPlugin>
    9. Q_IMPORT_PLUGIN(qjpeg)
    10.  
    11. int main(int argc, char *argv[])
    12. {
    13. QWebSettings::globalSettings()->setAttribute(QWebSettings::PluginsEnabled, true);
    14. QWebSettings::globalSettings()->setAttribute(QWebSettings::AutoLoadImages, true);
    15. QApplication a(argc, argv);
    16. QWidget *win = new QWidget();
    17. QVBoxLayout *lay = new QVBoxLayout();
    18. QWebView *web = new QWebView();
    19. QString qstring = QString(QApplication::applicationDirPath());
    20. //qstring += "../../../../.folder/index.html"; // Mac OS X
    21. qstring += "./.folder/index.html"; // Windows
    22. QUrl qurl = QUrl::QUrl(qstring);
    23. web->load(qurl);
    24. web->show();
    25. lay->setContentsMargins(0, 0, 0, 0);
    26. lay->addWidget(web);
    27. win->setLayout(lay);
    28. win->setGeometry(150, 60, 980, 680);
    29. win->show();
    30.  
    31. return a.exec();
    32. }
    To copy to clipboard, switch view to plain text mode 

    In fact, as you can see, I've a cached folder in the same repertory of my .exe (or my .app for MacOS X).
    In this folder, I've an index.html and all is working well. The images and the firstframeimage are displaying well but, on windows, the video can be displaying.

    In fact, when I test my application with online website, it works well but not with local folder.

    I don't know what I'm doing wrong.

    Can someone help me?
    Last edited by iUser59; 9th June 2009 at 15:00.

Similar Threads

  1. Replies: 0
    Last Post: 19th March 2009, 13:51
  2. Video freezes during mpeg video playback using Phonon
    By davejames in forum Qt Programming
    Replies: 2
    Last Post: 12th January 2009, 08:45
  3. To make audio and video file player in Qt
    By merry in forum Qt Programming
    Replies: 11
    Last Post: 24th January 2008, 06:31
  4. Video and QSlider
    By ToddAtWSU in forum Qt Programming
    Replies: 2
    Last Post: 1st May 2006, 19:37
  5. Flash with QT
    By Kapil in forum Qt Programming
    Replies: 1
    Last Post: 6th March 2006, 09:14

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.