Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Newbie question regarding multimediawidgets missing issue



  • Hello, new Qt person using VS2019, VisualGDB (trial) and Qt Creator and cross-compiling to my R-Pi4. I've created my first app and wanted to have it show a mp4 when specific interactions occurred, and as I was reading up on promoting widgets and such, and I went to add the includes in my .pro and .cpp files, and VS tells me I don't have the appropriate files for this.

    So, I came to the forums to ask a few questions. First, is this the best setup for development? I'm not sold on Visual Studio, and haven't bought the VisualGDB yet, so am open to other suggestions.

    If staying with VS2019, how do I get the files I need to be able to show a video? I simply wanted to play a short mp4 if someone clicked a button. It seems fairly easy from the sample code I've reviewed, but it makes it tough when VS doesn't seem to have the files.

    Thank you for the assistance.


  • Lifetime Qt Champion

    Hi,

    Do you mean you successfully cross-compiled Qt ?
    If so, then you likely where missing the GStreamer development packages in the sysroot you used for the cross-compilation.



  • @SGaist said in Newbie question regarding multimediawidgets missing issue:

    Hi,

    Do you mean you successfully cross-compiled Qt ?
    If so, then you likely where missing the GStreamer development packages in the sysroot you used for the cross-compilation.

    Yes, I hit build (F5) in Visual Studio, waited, it popped up on my Rpi4 and I was able to click away on it. I then decided I was doing great and wanted to figure out how to display a mp4 from a button click, and it seems the include files and such I need are missing. I tried to add lines to the .pro and such as I saw in numerous blog posts I searched through, but VS keeps telling me the qmultimedia or whatever (I'd have to go back and look as I'm old and forgot the exact name since yesterday) that I read I needed is not found.

    Now I've been beating myself over the head trying to get QT Creator to work as a cross-compiler because I figured it would be more "up to date" with files I needed, and I got it to create a windows app from the examples, but I try and add a device for my pi and it won't connect sftp or rsync.

    Is it because I have not installed an updated version of QT on my pi (running Raspbian)? I don't know, I have not been much of a Linux person in years. I also posted in the PI forum here about getting it cross-compiling, but have not gotten an answer yet.


  • Lifetime Qt Champion

    Can you give more details about how you setup your development environment ?
    There have been several people wanting to cross-compile from Windows to RPi4 and you are the first one here (I think) that is successful with that.

    Once you share these details it might be easier to find out why you have the QtMultimedia module missing.



  • @SGaist said in Newbie question regarding multimediawidgets missing issue:

    Can you give more details about how you setup your development environment ?
    There have been several people wanting to cross-compile from Windows to RPi4 and you are the first one here (I think) that is successful with that.

    Once you share these details it might be easier to find out why you have the QtMultimedia module missing.

    Sure, not a problem. I installed VS2019 the free edition. I turned on ssh on my Rpi and connected to it with RealVNC to test I could reach it (and not have to keep flipping inputs on my monitor from pc to pi, lol). I then installed VisualGDB which works with QMake. In Visual Studio you start the Linux project and edit the properties with the login and info on your RPi.

    At first trying to write the form (mainwindow.ui) was annoying in XML so I downloaded QT Creator and just opened that file and began manipulating the mainwindow and saving it, then when you build your project in Visual Studio it pushed the build app over to the RPi and runs it. It is connected still to Visual Studio on the windows box. If you are familiar with Visual Studio, you go back to it and press Shift-F5 to stop the build from running and it closes it on the RPi. You can then just go into the debug folder VisualGDB creates on the RPi and run the app direct on the Pi.

    The reason I tried to switch over to coding in QT Creator was when I tried to show a mp4 video in the build app I in Visual Studio I was reading and it said I needed QTMultimediaWidgets or QTMultimedia (info found here in comments) . When I could not include the required files I needed (kept telling me file not found) I thought maybe it would be easier to just switch all development over to QT Creator (instead of just the gui development), and that is where the trouble begins because I can't seem to connect that to the RPi like I did in Visual Studio even though I fill in the devices section in tools->options->devices->ssh and tools->options->devices->devices (add generic Linux device).

    I'm not even sure QT is the right way to go, but it seems like it. I was trying to develop a simple gui, and display a scoreboard and have the score increment when certain buttons are clicked (which I did in VS/VisualGDB and it runs on my RPi4). Once I get more familiar with sensors on the RPi I was planning on changing the button input over to readouts from the sensors connected to the RPi GPIO.

    It looks like people integrated sensors from the GPIO, but maybe my mistake is trying to code from a windows pc, maybe it is because I didn't update the version of QT that comes on the RPi-Raspbian. But I believe the issue might be in Visual Studio/VisualGDP not having the right files.

    I thought about just biting the bullet and even though it is slower (from what I've read) trying to run QT Creator on the RPi4 itself, but it seems like a world of hurt just trying to install it on there.

    Thanks for the replies!



  • Here is a link that describes the Visual Studio process better after you install VisualGDB.
    New VisualGDB Project setup

    My guess is if I update QT on my Rpi and start a new project it will bring those items down. But for me, not being a Linux person, this process seems daunting.


  • Lifetime Qt Champion

    Thanks for the informations !

    Which process do you find daunting ?



  • @SGaist What do I find daunting... anything to do with Linux and installing? :)

    It just seems that any time I try and do something that should be simple in Linux it never works and I spend more time trying to get something to just work than actually using the tool.

    Take for instance I thought that maybe it would be best if I took an old machine I had laying around and install Linux on it. Well, I was able to get that done and installed the newest build of Debian (because the Pi also runs a version of Debian), but then I spent half a day trying different items to get x11VNC on it (which I never did get working). I spent half my day searching what was going on, and why I was getting errors. About 4am my phone went bling from someone on another forums who said maybe it's Debian/Wayland.

    Anyhow, to ease my frustration I decided to install QT from the website, and I did get that running on the linux pc. As I figured since others had been able to do the cross-compile that way, maybe that would be best for me. But when I tried to compile one of the sample projects, to test it, I get "The selected build of GDB does not support Python scripting. It cannot be used in QT Creator." Well, I wasn't doing any Python. So, now I have to try and resolve that.

    Then I went on to try and get cross-compile working because I thought maybe if that was setup it wouldn't think I was doing Python (for whatever reason). I came across this wiki post and failed miserably around Step 10, so I found this blog post and again failed miserably right around where he talks about the wiki's step 10 (the configure/make area). Now in their defense I was trying to install the newest version of QT, 5.14.1, and switching up some of their commands. And now I don't know where to go next.

    I know I'm doing a lot of griping, but if I could just get it to work I'd stop, because then I'd be writing code, lol...



  • @MichRX7 said in Newbie question regarding multimediawidgets missing issue:

    I get "The selected build of GDB does not support Python scripting. It cannot be used in QT Creator." Well, I wasn't doing any Python. So, now I have to try and resolve that.

    I don't know about your other issues, or whether cross-compiling is a good or bad idea. But for this one: Qt Creator itself does use Python (scripts) for its gdb debugging, and that may require a newish version of gdb/gcc package? Where did you get those from, what versions are they at?



  • @JonB said in Newbie question regarding multimediawidgets missing issue:

    @MichRX7 said in Newbie question regarding multimediawidgets missing issue:

    I get "The selected build of GDB does not support Python scripting. It cannot be used in QT Creator." Well, I wasn't doing any Python. So, now I have to try and resolve that.

    I don't know about your other issues, or whether cross-compiling is a good or bad idea. But for this one: Qt Creator itself does use Python (scripts) for its gdb debugging, and that may require a newish version of gdb/gcc package? Where did you get those from, what versions are they at?

    If I do a python --version from a terminal window it tells my it is Python 2.7.16

    Do I have to tell QT Creator where to find it?



  • @MichRX7
    That is old Python2. Linux ships with python command pointing to Python2, but python3 command to point to Python3.

    I don't think you have to tell Qt Creator anything about Python. As I said, what you need to look at is what version of gdb you have/it is using. The implication of the error message is that it is the gdb which is not good.

    See also e.g. http://sourceware.org/gdb/current/onlinedocs/gdb/Python.html. It says:

    This feature is available only if GDB was configured using --with-python.

    Maybe your gdb is not built with that.

    I'm afraid this is all outside my experience.



  • So I should have installed a newer version of Python before installing QT? Why wouldn't QT tell me that before I installed it? Is there an "Installing QT Creator for Dummies" area that walks me through step-by-step what I should have done?



  • This is what is so frustrating. I have Python3, if I enter "python3 --version" it tells me I have Python 3.7.3



  • @JonB said in Newbie question regarding multimediawidgets missing issue:

    @MichRX7
    That is old Python2. Linux ships with python command pointing to Python2, but python3 command to point to Python3.

    I don't think you have to tell Qt Creator anything about Python. As I said, what you need to look at is what version of gdb you have/it is using. The implication of the error message is that it is the gdb which is not good.

    See also e.g. http://sourceware.org/gdb/current/onlinedocs/gdb/Python.html. It says:

    This feature is available only if GDB was configured using --with-python.

    Maybe your gdb is not built with that.

    I'm afraid this is all outside my experience.

    So, how do I get the gdb "which is good"?



  • Do I download this Linux file from here, edit the versions inside and run it somehow to make a working gdb?

    I'd really like to actually build something inside QT Creator, lol...


  • Lifetime Qt Champion

    One way to check it gdb was built with python is to call ldd $(which gdb). It will list the libraries gdb is linked against and you should have the python library if gdb was built against it including the version of Python.


  • Lifetime Qt Champion

    @MichRX7 What Linux distribution and version do you actually use?



  • @SGaist said in Newbie question regarding multimediawidgets missing issue:

    ldd $(which gdb)

    ldd $(which gdb)
    linux-gate.so.1 (0xb7f38000)
    libreadline.so.7 => /lib/i386-linux-gnu/libreadline.so.7 (0xb77e7000)
    libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb77c8000)
    libtinfo.so.6 => /lib/i386-linux-gnu/libtinfo.so.6 (0xb779f000)
    libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb7799000)
    libexpat.so.1 => /lib/i386-linux-gnu/libexpat.so.1 (0xb775e000)
    libipt.so.2 => /lib/i386-linux-gnu/libipt.so.2 (0xb773d000)
    libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb7637000)
    libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7459000)
    /lib/ld-linux.so.2 (0xb7f3a000)
    libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb7438000)



  • @jsulm said in Newbie question regarding multimediawidgets missing issue:

    @MichRX7 What Linux distribution and version do you actually use?

    Debian GNU/Linux 10 (buster)
    Running it on an old Dell Latitude D630 I found sitting in a box. :)


  • Lifetime Qt Champion

    Which version of gdb do you have ? I thought that the buster current version was built with python support.



  • @SGaist said in Newbie question regarding multimediawidgets missing issue:

    Which version of gdb do you have ? I thought that the buster current version was built with python support.

    gdb --version
    GNU gdb (Debian 8.2.1-2+b3) 8.2.1


  • Lifetime Qt Champion

    @MichRX7 This site tells me that GDB on that Debian version uses Python: https://packages.debian.org/buster/gdb
    Are you sure you installed the default gdb package?



  • @jsulm Unsure, on that box I installed QT and Creator direct from the download page. Unless I did something trying to follow the directions somewhere on how to cross-compile on a raspberry pi (unsuccessfully follow that is) I do not know.


Log in to reply