Skip to content
  • 0 Votes
    1 Posts
    51 Views
    No one has replied
  • 0 Votes
    2 Posts
    108 Views
    SGaistS

    Hi,

    A missing SQL plugin should not crash your application unless you do some strange things. At best your queries will fail because no connection can be established.

    However, running your application as root might explain. By default recent Linux distributions forbid running GUI application as root user.

  • 0 Votes
    4 Posts
    518 Views
    K

    @codeform I'm having the same issue. Conan's version of Qt doesn't seem to set the right qt cmake variables.
    Namely, QT6_IS_SHARED_LIBS_BUILD and QT_DEPLOY_SUPPORT are missing.

  • 0 Votes
    2 Posts
    425 Views
    Y

    I've managed to deploy a test app from Monterey which works on Catalina and Monterey and given up on building on Catalina after spending a few days trying to fix the result of macdeployqt using otool and install_name_tool.

    It seems that the CMake qt_generate_deploy_app_script method doesn't work when run from Monterey either. Running the macdeployqt utility almost works out of the box, it just leaves the plugins' RPATH pointing to a nonexistent 'lib' folder where it expects Qt frameworks to be. Rather than fix the RPATH's in each of those plugin libs, adding a 'lib' symlink pointing to the Frameworks folder seems to do the trick.

    In case it's useful to anyone, I've made a template repository on GitHub with this solution. The template allows you to deploy apps with LGPL Qt on Mac and Windows and use VSCode as an IDE rather than QtCreator:

    https://github.com/yergin/qt-cmake-vscode

  • 0 Votes
    7 Posts
    2k Views
    JonBJ

    @thaidy said in QT Deploy QPSQL Plugin:

    @hskoglund said in QT Deploy QPSQL Plugin:

    what happens if you move the declaration into for example your MainWindow.h class:
    QSqlDatabase DB;
    DB = QSqlDatabase::addDatabase("QPSQL"):

    IT WAS THAT, THANK YOU VERY MUCH!!

    Glad this has solved problem, certainly better than some static variable.

    However, this is still not right/advised. Per https://doc.qt.io/qt-5/qsqldatabase.html#details, red box warning:

    Warning: It is highly recommended that you do not keep a copy of the QSqlDatabase around as a member of a class, as this will prevent the instance from being correctly cleaned up on shutdown. If you need to access an existing QSqlDatabase, it should be accessed with database(). If you chose to have a QSqlDatabase member variable, this needs to be deleted before the QCoreApplication instance is deleted, otherwise it may lead to undefined behavior.

    Qt asks you to simply call
    static QSqlDatabase QSqlDatabase::database(const QString &connectionName = QLatin1String(defaultConnection), bool open = true)
    whenever you need to access a QSqlDatabase, and not to keep even a member variable QSqlDatabase around. You don't need it.

  • 0 Votes
    2 Posts
    981 Views
    H

    I have found a solution! I did multiple things:

    Used newer template files for Android from Qt/6.2.3/android_arm64_v8a/src/android/templates/ (res/values/libs.xml - overwritten, build.gradle - overwritten, AndroidManifest.xml - copy and paste and then edited the content and added the missing things from my old one) Used newer gradle files from /Qt/6.2.3/android_arm64_v8a/src/3rdparty/gradle/gradle/wrapper/ - overwritten Upgrade of Qt Creator, Qt 6.2.2 -> 6.2.3, Android SDK, Android NDK

    My current Manifest:

    <?xml version="1.0"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.dontpanic" android:installLocation="auto" android:versionCode="20000" android:versionName="2.0"> <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="31"/> <!-- The comment below will be replaced with dependencies permissions upon deployment. Remove the comment if you do not require these default permissions. --> <!-- %%INSERT_PERMISSIONS --> <!-- The comment below will be replaced with dependencies permissions upon deployment. Remove the comment if you do not require these default features. --> <!-- %%INSERT_FEATURES --> <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" /> <application android:name="org.qtproject.qt.android.bindings.QtApplication" android:extractNativeLibs="true" android:hardwareAccelerated="true" android:label="@string/app_name" android:icon="@drawable/icon" android:requestLegacyExternalStorage="true"> <activity android:name="org.qtproject.qt.android.bindings.QtActivity" android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density" android:label="@string/app_name" android:launchMode="singleTop" android:screenOrientation="portrait"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> <!-- Application arguments --> <meta-data android:name="android.app.arguments" android:value="-- %%INSERT_APP_ARGUMENTS%% --" /> <!-- Application arguments --> <meta-data android:name="android.app.lib_name" android:value="-- %%INSERT_APP_LIB_NAME%% --" /> <!-- Background running --> <!-- Warning: changing this value to true may cause unexpected crashes if the application still try to draw after "applicationStateChanged(Qt::ApplicationSuspended)" signal is sent! --> <meta-data android:name="android.app.background_running" android:value="false" /> <!-- Background running --> <!-- extract android style --> <!-- available android:values : * default - In most cases this will be the same as "full", but it can also be * something else if needed, e.g., for compatibility reasons * full - useful QWidget & Quick Controls 1 apps * minimal - useful for Quick Controls 2 apps, it is much faster than "full" * none - useful for apps that don't use any of the above Qt modules --> <meta-data android:name="android.app.extract_android_style" android:value="minimal" /> <!-- extract android style --> </activity> <service android:name="org.dontpanic.NotificationService"> <meta-data android:name="android.app.lib_name" android:value="-- %%INSERT_APP_LIB_NAME%% --"/> </service> <receiver android:name="org.dontpanic.NotificationReceiver" android:enabled="true" android:exported="true"/> <receiver android:name="org.dontpanic.RebootReceiver" android:enabled="true" android:exported="true"> <intent-filter> <action android:name="android.intent.action.BOOT"/> <action android:name="android.intent.action.LOCKED_BOOT_COMPLETED"/> <action android:name="android.intent.action.BOOT_COMPLETED"/> <action android:name="android.intent.action.QUICKBOOT_POWERON"/> <action android:name="android.intent.action.REBOOT"/> <action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/> <action android:name="android.intent.action.USER_PRESENT"/> <category android:name="android.intent.category.DEFAULT"/> </intent-filter> </receiver> </application> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> </manifest>
  • 0 Votes
    3 Posts
    3k Views
    gde23G

    The reason linuxdeployqt does not support your latest ubuntu is not, that its not up to date, but it is on purpose.
    If you build your appimage on a new linux and then want to run it on an older installation it might not work there since e.g. the libc version on the older system does not support new features that have been added. And running on any system is the whole point of the appimage.

  • 0 Votes
    13 Posts
    1k Views
    jsulmJ

    @Piotrek102 said in QSQLITE app no connect to database after deploy:

    But what I sent you is not the main application file. It's part of the class I wrote

    It doesn't matter. What @JonB wrote applies.

  • Aplikacja SQL

    Unsolved Polish
    1
    0 Votes
    1 Posts
    527 Views
    No one has replied
  • 0 Votes
    3 Posts
    532 Views
    aha_1980A

    Hi @TUStudi,

    This virtual maschine need to support Bluetooth Low Energy.

    If you have an USB bluetooth dongle/adapter, than you can most likely inject this dongle into the virtual machine and use it there. Note that even bluetooth adapters built into your laptop may be an USB devices and could work that way.

    So I'd say it depends on a test.

    Regards

  • 0 Votes
    4 Posts
    555 Views
    mrjjM

    Hi and welcome to the forums
    Yes it should run on most other windows 10 64 bit. Maybe even win 7.
    But there is no guarantee as such with brand new mega patches.
    A license would give you many benefits but it's not better to deploy as such.

  • 0 Votes
    8 Posts
    4k Views
    Pablo J. RoginaP

    if you dont have any windows manager running then it will be an issue for xcb.

    Yes, it looks like @mrjj is right here.

    However, you could still run the Qt app in the RPi device and make it display on another machine if you connect via SSH with X Forwarding enabled.

    $ ssh -X user@RPi /path/to/your/Qt/app -platform xcb
  • 0 Votes
    2 Posts
    1k Views
    pauleddP

    I somehow workaround it.
    On the RaspberryPi I created a bash script in /usr/bin:

    /usr/bin/x5

    #!/bin/bash xhost +local: sudo /home/pi/adas0002 --platform xcb

    I made it executable and then on my Desktop-Pc in Qt-Creator
    I have "/usr/bin/x5" in "Alternate executable on device".

    Now my application starts with root even without invoking any terminal.
    I know this is very bad in security point of view but I dont care on my little offline
    Raspi...

  • 0 Votes
    6 Posts
    2k Views
    Y

    Hi,
    I am able to open the application by double click. I made change in Icon and Exec path.

    Exec=APP_PACKAGE_PATH/SquidStat.sh Icon=APP_PACKAGE_PATH/Squidstat.png
  • 0 Votes
    2 Posts
    596 Views
    S

    @stecco ok. Ho impostato clang come compilatore c++

  • 0 Votes
    5 Posts
    1k Views
    P

    @SGaist Ahh, okay I see it.

    Clone Build Config -> Delete Build Steps -> add Custom Process Step

    Thanks for the inspiration!

  • 0 Votes
    2 Posts
    1k Views
    SGaistS

    Hi,

    You have to build your application on the oldest Linux distribution you have to support.

  • 0 Votes
    3 Posts
    1k Views
    raven-worxR

    @BINALECTRUM said in Android build and deploy. 64bit, Clang, new app store developer console rules [2018 & 2019]:

    Is Qt going more in embedded/car side and just slowly drops Android/mobile platform? In Roadmap 2018 there is nothing new about mobile platform.

    i heavily doubt that.
    I guess the reason is more because Qt runs more or less stable on Android. There are no bigger features which need to be implemented, mostly bug fixing.

    What is your move Qt team on new app store rules in developer console: minimal platform-26 in August 2018 and 64-bit apk in 2019? Some new changes in build and deploy area?

    i asked this at the beginning of the year, but unfortunately haven't received an answer.

  • 0 Votes
    4 Posts
    1k Views
    SGaistS

    Latest drivers ?

  • 0 Votes
    5 Posts
    3k Views
    Pablo J. RoginaP

    @torpeanders I always use just one resource file per project, and although not completely sure, it looks like having RESOURCES += ...
    is intended for just one resource file.
    I'm not sure if you need two resource files, I'd ask what is your use case for that, please remember that you can have subfolders to split just in case; i.e. I usually have a subfolder images for the icons and a subfolder translations and then it's a question of using the proper path

    QIcon(":/images/cut.png")

    So if even this trick cannot avoid you having two resource files, please have a look at the documentation as it explains how to create/deal with external resource files (it'll be your 2nd one).