Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Delete video player.
Forum Updated to NodeBB v4.3 + New Features

Delete video player.

Scheduled Pinned Locked Moved Qt Creator and other tools
2 Posts 2 Posters 1.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    felipe.c.sousa
    wrote on last edited by
    #1

    Hello developers.
    I' m finding problems to remove a video, when they was playing. I try stop the video using:
    @ ui->videoPlayer->stop();
    ui->videoPlayer->close();
    delete ui->videoPlayer;
    ui->videoPlayer->deleteLater();@

    but, dont work. somebody can help me?

    (sorry for my english)

    From all, to all.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      @
      delete ui->videoPlayer;
      ui->videoPlayer->deleteLater();
      @

      That is definitely not a good sequence. You are calling deleteLater() on something that is not there (or, to be more precise, on a dangling pointer). Deleting stuff from UI can also be tricky. You need to take layouts into consideration (be polite: remove widget from layout before deleting). However, I doubt that is what you need or want. You should stop the video, not remove the whole widget. If that is a widget, of course - it's hard to tell from that code.

      (Z(:^

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved