Skip to content
  • 0 Votes
    7 Posts
    2k Views
    R

    @Chris-Kawa Thanks, it works !

  • 0 Votes
    2 Posts
    757 Views
    J.HilkJ

    @Yalimyulad said in Post installing Qmake for new devices:

    Is it possible to somehow copy the Qmake I have built from raspberry pi to my desktop?

    Nothing is physically stopping you, but it won't work.

    qmake is created and specific to the Qt FrameWork/Compiler used for that framework.
    The compiler on your pi is not the same as the one you would use for cross compiling

    If you want to really cross compile for the Pi , you will have to jump through some loops.
    There are some guides out there for example this wiki entries

    https://wiki.qt.io/Raspberry_Pi_Beginners_Guide
    https://wiki.qt.io/RaspberryPi2EGLFS

  • 0 Votes
    1 Posts
    473 Views
    No one has replied
  • WSL Qt Ubuntu?

    Unsolved Installation and Deployment
    2
    0 Votes
    2 Posts
    11k Views
    sierdzioS

    @Dariusz said in WSL Qt Ubuntu?:

    how can I install Qt on Linux in shell?

    sudo apt install qt5-qmake

    Or use @benlau's excellent Qt silent installation scripts: https://github.com/benlau/qtci

    Or compile Qt yourself.

  • 0 Votes
    7 Posts
    1k Views
    A

    @sneubert Thanks :)

  • 0 Votes
    2 Posts
    597 Views
    RatzzR

    @lucaszanella
    Do you have a resource file named openglunderqml.qrc ?
    Can you refer this example?

  • 0 Votes
    2 Posts
    975 Views
    SGaistS

    Hi,

    AFAIK, no. IIRC KDevelop has some stuff already implemented for Docker, but not Qt Creator.

  • 0 Votes
    3 Posts
    1k Views
    M

    This is my take. Please comment back if you find a better way. Suggest you use a separate script for installation and de-installation and take care of both the application and maintenance tool together. There are 3 is steps involved:
    Step 1. Creating the scripts to be run on installation and de-installation
    Step 2. Including the scripts into the installation bundle
    Step 3. Modifying the installations and de-installation process to invoke the scrips at the appropriate time

    Step 1: Creating the Scripts
    Step 1a: Creating the Installation Scripts
    The installation scripts can perform the following actions:
    a. Create .desktop files for the application and the maintenance tool
    b. Move the icons to the appropriate location
    c. Use the gnome tool gio to associate the icon with the application and maintenance tool
    b. Add the new application to favourites

    The following is called linuxInstall.bash and is located in my ~/pkg folder

    #------Start of the installation script #!/bin/bash #Get the location of the script = location of executables and icons SCRIPT=$(readlink -f "$0") SCRIPTPATH=$(dirname "$SCRIPT") #Work out the destination file locations ICONDESTINATION=$1"/.local/share/icons/hicolor/48x48/apps/MyApp.png" MYAPPDESKTOP=$1"/.local/share/applications/MyApp.desktop" MyAPPMAINTDESKTOP=$1"/.local/share/applications/MyAppMaintenance.desktop" #Move the icon mv $SCRIPTPATH/MyApp.png $ICONDESTINATION #Write out the MyApp.desktop file echo "[Desktop Entry]" >> $MyAppDESKTOP echo "Version=0.1" >> $MyAppDESKTOP echo "Name=MyApp" >> $MyAppDESKTOP echo "Comment=Does super important stuff" >> $MyAppDESKTOP echo "Exec=$SCRIPTPATH/MyApp" >> $MyAppDESKTOP echo "Icon=$ICONDESTINATION">> $MyAppDESKTOP echo "Terminal=false" >> $MyAppDESKTOP echo "Type=Application" >> $MyAppDESKTOP echo "Categories=Utility" >> $MyAppDESKTOP #Write out the MyAppMaintenance.desktop file echo "[Desktop Entry]" >> $MYAPPMAINTDESKTOP echo "Version=0.2" >> $MYAPPMAINTDESKTOP echo "Name=MyApp Maintenance Tool" >> $MYAPPMAINTDESKTOP echo "Comment=Install, update and delete MyApp" >> $MyAppMAINTDESKTOP echo "Exec=$SCRIPTPATH/MyAppMaintenanceTool --updater" >> $MyAppMAINTDESKTOP echo "Icon=$ICONDESTINATION">> $MyAppMAINTDESKTOP echo "Terminal=false" >> $MyAppMAINTDESKTOP echo "Type=Application" >> $MyAppMAINTDESKTOP echo "Categories=Utility" >> $MyAppMAINTDESKTOP #Associate the icon with the executable gio set $SCRIPTPATH/MyApp metadata::custom-icon file://$ICONDESTINATION #Add MyApp application to favourites FAVORITES=$(gsettings get org.gnome.shell favorite-apps) NEWFAVOURITES=${FAVORITES::-1}", 'MyApp.desktop']" dconf write /org/gnome/shell/favorite-apps "$NEWFAVOURITES" #------End of the installation script

    Once you have create this script test and debug. Copy it to the install directory manually and then invoke it from the command line with one parameter being you home directory. This might looks something like:
    /home/me/MyApp>./linuxInstall.bash /home/me

    Step 1b: Creating the deinstallation script

    #------Start of the de-installation script #!/bin/bash #Get the location of the script = location of executables and icons SCRIPT=$(readlink -f "$0") SCRIPTPATH=$(dirname "$SCRIPT") #Work out the destination file locations MYAPPICON=$1"/.local/share/icons/hicolor/48x48/apps/MyApp.png" MYAPPDESKTOP=$1"/.local/share/applications/MyApp.desktop" MYAPPMAINTDESKTOP=$1"/.local/share/applications/MyAppMaintenance.desktop" #Remove MyApp application from favourites FAVORITES=$(gsettings get org.gnome.shell favorite-apps) NEWFAVOURITES=${FAVORITES/", 'MyApp.desktop']"}"]" dconf write /org/gnome/shell/favorite-apps "$NEWFAVOURITES" #Remove the files rm $MYAPPICON rm $MYAPPDESKTOP rm $MYAPPMAINTDESKTOP #------End of the de-installation script

    As for the installation script make sure you debug the deinstallation script and get it working correctly.

    NEXT STEP: I have not checked this deinstallation script in detail and in particular worry that removing the MyApp from the end of the favourites list will fail if additional favourites are added when MyApp is removed.

    Step 2. Including the scripts into the installation bundle
    I have a separate script that creates the .7z file in the data folder. At a high level it:
    a. Creates a tmp directory off ~/pkg
    B. Copies the MyApp executable, qt .so's the installation and de-installation scripts above and the icon.png into the tmp directory
    c. Uses the archive tool to create the .7z file
    d. Copies the .7z file to the data folder
    e. Removes the tmp directory
    f. Creates the installer
    g. Creates the download archive

    If you don't already have something similar, I'd suggest you create a script to do this - my experience is it takes quite a few iterations to get this right and the script really helps

    Once you've included the .bash scripts into the .7z file, when you run the installer you should find both the installation and deinstallation scripts in the install directory and invoking them manually from the command line should complete the gnome installation and de-installation as expected.

    Step 3. Modifying the installations and De-installation process
    In this final step we get the QT IFW to invoke the installation and deinstallation scripts automatically.

    Step 3a. Modifying the installation process
    In the meta directory in the package.xml file you need the following line:
    <Script>controller.qs</Script>

    Then in the meta directory create a file called controller.qs with something like the following content:

    //------Start of the controller.qs script Component.prototype.installationFinishedPageIsShown = function() { try { if (installer.isInstaller() && installer.status == QInstaller.Success) { var message = "Installation got systemInfo.kernelType == " + systemInfo.kernelType; console.log(message); if (systemInfo.kernelType === "winnt") { //Windows console.log("Installing MyApp on Windows"); } else if (systemInfo.kernelType === "darwin") { //macOS console.log("Installing MyApp on MacOS"); } else if (systemInfo.kernelType === "linux"){ console.log("Installing MyApp on Linux"); //Use a bash to do the linux desktop specific setup var args = ["@HomeDir@"]; installer.executeDetached("@TargetDir@/linuxInstall.bash", args); } else { cancelInstaller("MyApp installers are available for Windows, MacOS and Linux only."); return; } } } catch(e) { console.log(e); } } function Component() { installer.installationFinished.connect(this, Component.prototype.installationFinishedPageIsShown); } //------End of the controller.qs script

    Step 3b. Modifying the de-installation process
    In the config directory in the config.xml file you need the following line:
    <ControlScript>deinstallscript.qs</ControlScript>
    Then in the config directory create a file called deinstallscript.qs with something like the following content:

    //------Start of the deinstallscript.qs script Controller.prototype.uninstallationStartedFunction = function() { try { var message = "Uninstallation got systemInfo.kernelType == " + systemInfo.kernelType; console.log(message); if (systemInfo.kernelType === "winnt") { //Windows console.log("Uninstalling MyApp on Windows"); } else if (systemInfo.kernelType === "darwin") { //macOS console.log("Uninstalling MyApp on MacOS"); } else if (systemInfo.kernelType === "linux"){ console.log("Uninstalling MyApp on Linux"); //Use a bash to do the linux desktop specific de-installation var args = ["@HomeDir@"]; installer.executeDetached("@TargetDir@/linuxUninstall.bash", args); } } catch(e) { console.log(e); } } function Controller() { installer.uninstallationStarted.connect(this, Controller.prototype.uninstallationStartedFunction); } //------End of the deinstallscript.qs script

    I know the .qs scripts to install and de-install look similar, but note the use of 'Component' in controller.qs, but the use of 'Controller' in deinstallscript.qs.

    Some final thoughts:

    The gnome script assume the user has installed MyApp for the current user only. I believe this is an appropriate default, but it might be nice if there was a check-box that allowed the user to specify if the application is for all users and acquired the admin right required. The paths where things are placed will need to be updated. I spent some time looking for how to detect gnome vs KDE, but all methods seemed error prone. My current through is just to check if gio is present and if so do a gnome install, but haven't gotten around to adding it yet. You can use ldd to check which qt .so's you application depends on. It might be nice to do this as part of the packing script.
  • 0 Votes
    2 Posts
    1k Views
    JonBJ

    @gizalp
    Why do you think python (or anything else) is going to open any terminal window? And what OS are you on anyway?

    For QProcess:setProgram you should have process.setProgram("python");, only. But in this case I think it's getting overridden by your process.start("python test.py"); so it doesn't matter, but it's wrong.

    If you want to grab a sub-process's output, you have to handle QProcess::readyReadStandardOutput(), and in there something like QByteArray QProcess::readAllStandardOutput(), if that's what you mean by "How can I get the 'Hello' output?".

    How this relates to Trying to implement thumbnail list I have no idea....

  • 0 Votes
    27 Posts
    15k Views
    MucipM

    Hi @huseyinkozan
    Yes. It works like a charm.

    Regards,
    Mucip:)

  • 0 Votes
    17 Posts
    21k Views
    K

    Found the solution, install qtdeclarative5-dev package;

    Type in terminal; sudo apt-get install qtdeclarative5-dev

  • 0 Votes
    20 Posts
    8k Views
    tomyT

    Thank you all. The problem is solved I think. I up vote all answers to appreciate your help.

  • 0 Votes
    12 Posts
    4k Views
    SGaistS

    Following what you wrote, it looks like you should rather take a look at QDesktopWidget.

  • 0 Votes
    5 Posts
    2k Views
    JonBJ

    @FrankiPL
    I suspect @speeter will have long disappeared, as that post was a year ago :)

    Just a thought: have a look at (the first part of) https://raspberrypi.stackexchange.com/a/61086, which claims it's a generic Linux problem rather than just a RPi one. It's not quite the same messages, but worth investigating?

  • QML Audio for Ubuntu 16.04 LTS

    Unsolved QML and Qt Quick
    7
    0 Votes
    7 Posts
    2k Views
    mrjjM

    @THEFree
    Yep and they also talk about linux there
    sudo zypper install libgstreamer-0_10-0
    which is same for ubuntu just using apt-get install

    And if you have the correct version installed then maybe
    sudo apt-get install libqt5multimedia5-plugins
    will do it for you.

  • 0 Votes
    17 Posts
    6k Views
    W

    Thank you dear friend .

    You're right . the drivers names were wrong . it works now

  • 0 Votes
    8 Posts
    7k Views
    L

    Solved, gstreamer-0.10-ffmpeg was missing.

    sudo add-apt-repository ppa:mc3man/gstffmpeg-keep sudo apt-get update sudo apt-get install gstreamer0.10-ffmpeg

    UPDATE:

    Not really solved, using this plugin breaks GStreamer:

    $ export GST_DEBUG=2 $ ./RPIStreamer 0:00:01.232878440 29169 0x7f0414007320 WARN qtdemux qtdemux_types.c:191:qtdemux_type_get: unknown QuickTime node type iods 0:00:01.233010807 29169 0x7f0414007320 WARN qtdemux qtdemux_types.c:191:qtdemux_type_get: unknown QuickTime node type avc1 0:00:01.233055875 29169 0x7f0414007320 WARN qtdemux qtdemux_types.c:191:qtdemux_type_get: unknown QuickTime node type avcC 0:00:01.233095592 29169 0x7f0414007320 WARN qtdemux qtdemux_types.c:191:qtdemux_type_get: unknown QuickTime node type btrt 0:00:01.235499777 29169 0x7f0414007320 WARN qtdemux qtdemux.c:6006:qtdemux_parse_segments:<qtdemux0> streaming; discarding edit list segments 0:00:01.235563181 29169 0x7f0414007320 WARN qtdemux qtdemux.c:7044:qtdemux_parse_trak:<qtdemux0> unknown version 00000000 0:00:01.236318578 29169 0x7f0414007320 WARN qtdemux qtdemux.c:6006:qtdemux_parse_segments:<qtdemux0> streaming; discarding edit list segments 0:00:01.264479125 29169 0x7f0414007680 WARN playsinkconvertbin gstplaysinkconvertbin.c:481:gst_play_sink_convert_bin_cache_converter_caps:<GstPlaySinkAudioConvert@0x7f03f801a050> No conversion elements 0:00:01.290541635 29169 0x7f04140071e0 WARN ffmpeg gstffmpegdec.c:2299:gst_ffmpegdec_frame:<ffdec_h2640> ffdec_h264: decoding error (len: -1, have_data: 0) 0:00:01.297533958 29169 0xba4d40 WARN basesrc gstbasesrc.c:2625:gst_base_src_loop:<source> error: Internal data flow error. 0:00:01.297562286 29169 0xba4d40 WARN basesrc gstbasesrc.c:2625:gst_base_src_loop:<source> error: streaming task paused, reason not-negotiated (-4) Error: "Internal data flow error."
  • 0 Votes
    3 Posts
    1k Views
    aghictA

    How can I fix this problem?

  • 0 Votes
    4 Posts
    1k Views
    M

    Alright if you say it may couse some problems I think I will install it twice.

  • 0 Votes
    1 Posts
    710 Views
    No one has replied