Skip to content

Mobile and Embedded

The forum for developing everything embedded: Linux, WinCE, Symbian, MeeGo... you name it.
14.1k Topics 62.6k Posts
  • How to calcuate font size to fit a text inside a given rectangle

    13
    1 Votes
    13 Posts
    16k Views
    SebastienLS
    Here is my code the fit (in heigth) a text, works quite well (error < 2% I guess) : void scalePainterFontSizeToFit(QPainter &painter, QFont &r_font, float _heightToFitIn) { float oldFontSize, newFontSize, oldHeight; // Init oldFontSize=r_font.pointSizeF(); // Loop for (int i=0 ; i<3 ; i++) { oldHeight = painter.fontMetrics().boundingRect('D').height(); newFontSize = (_heightToFitIn / oldHeight) * oldFontSize; r_font.setPointSizeF(newFontSize); painter.setFont(r_font); oldFontSize = newFontSize; //qDebug() << "OldFontSize=" << oldFontSize << "HtoFitIn=" << _heightToFitIn << " fontHeight=" << oldHeight << " newFontSize=" << newFontSize; } // End r_font.setPointSizeF(newFontSize); painter.setFont(r_font); }
  • I can't run program in ios simulator

    Unsolved
    1
    0 Votes
    1 Posts
    368 Views
    No one has replied
  • Qt5.5 Ministro is not compatible with your application.

    Unsolved qt 5.5 ministro
    1
    0 Votes
    1 Posts
    735 Views
    No one has replied
  • Qt on Brillo?

    Unsolved
    2
    0 Votes
    2 Posts
    559 Views
    SGaistS
    Hi, That's a question best suited for the interest mailing list. You'll find there Qt's developers/maintainers. This forum is more user oriented.
  • Android development with QML and C++ for back-end

    Unsolved c++ qml android
    7
    0 Votes
    7 Posts
    2k Views
    M
    No, one does not need to use Qt classes. Just about any C++ or C can do for the business logic, but Qt-derived classes would be the glue between QML and those.
  • Save Image to Android device

    Solved android qurl image save qt 5.7
    24
    0 Votes
    24 Posts
    16k Views
    M
    @Qojote Thank you and congratulations for giving all the details for solving this old and apparently common problem! Without the smallest details, this kind of things are never solved.
  • Audio Recording

    Unsolved
    4
    0 Votes
    4 Posts
    2k Views
    canellasC
    Hi! The 'QAudioRecorder::setEncodingSettings' method takes 3 parameters: 'const QAudioEncoderSettings & audio', 'const QVideoEncoderSettings & video', and 'const QString & container'. The codec you defined does not define the type of file that will recorded. This is done by the 'container' parameter. If you let it undefined, the OS will choose what ever it wants. My experience is that on iOS it chooses "wav", while on Android it chooses "mp4". So, I know 3 ways: you can set the value of 'container', and hope it works on your device; you can leave it to the OS, as I said above; you can examine the 'QStringList QAudioRecorder::supportedContainers() const', and choose one. Oh, the 'video' parameter I use 'QVideoEncoderSettings()' default constructor. Good luck!
  • Building an Android app with Qmake on Windows

    Unsolved
    7
    0 Votes
    7 Posts
    3k Views
    aalexA
    The Qt and Android utilities are not installed on a system-wide standard path on that computer. So, I thought I might want to add these directories to the PATH environment variable. See https://forum.qt.io/topic/38255/solved-cannot-read-from-input-file-android-lib-so-deployment-settings-json/2 So, I set my PATH: (but it still doesn't work) :: Check if our bin path is already in PATH :: Add it if not. (permanently change it in the registry) :: See HKEY_CURRENT_USER/Environment/PATH SET PATH_ANDROID_BIN="%SOFTEXT_PATH%\Android\android-sdk\build-tools" SET PATH_MINGW_BIN="%SOFTEXT_PATH%\Android\mingw530_32\bin" SET PATH_QT_BIN="%SOFTEXT_PATH%\Qt\5.7\android_armv7\bin" SET PATHTOADD="%PATH_MINGW_BIN%;%PATH_QT_BIN%;%PATH_ANDROID_BIN%" ECHO "%PATH" | FIND /C:"%PATHTOADD%" >nul & IF ERRORLEVEL 1 ( ECHO "The path to the Android utils is a already in PATH" ECHO "PATH: %PATH%" ) else ( ECHO "Adding the path to the Android utils to PATH" ECHO "Beware that the PATH cannot have more than 1024 characters." :: Note that the separator is ";" SETX PATH "%PATH%;%PATHTOADD%" ECHO "New PATH: %PATH%" )
  • Where's my bundle .plist file?

    Solved ios
    6
    0 Votes
    6 Posts
    3k Views
    D
    @SGaist Unfortunately that did not work. For now, I'm going to mark this as solved as my previous fix is good enough for now. Thanks!
  • Android development with Services (background app)

    Unsolved
    1
    0 Votes
    1 Posts
    379 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    2
    0 Votes
    2 Posts
    25 Views
    No one has replied
  • Works on Ubuntu15.10 X86_64bit Desktop, doesnt work on Arm Android 6.0.1

    2
    0 Votes
    2 Posts
    552 Views
    jsulmJ
    @pgmQt What do you mean by "server no longer recognizes the messages"? Does the server get the messages but cannot interpret them, or are there no messages on the server side? If the server gets the messages you can just check their content to see whether messages are valid or not.
  • Cannot load from SD card created with Boot to Qt tool on Colibri iMX6

    Unsolved boot to qt imx6
    4
    0 Votes
    4 Posts
    2k Views
    NatalieSN
    Thank you so much for your recommendation! I will follow up with them.
  • 0 Votes
    4 Posts
    2k Views
    Douglas YooD
    I found the root cause of this issue. https://bugreports.qt.io/browse/QTBUG-52949 It was a bug of Lollipop 5.0. The bug was first fixed in version 5.1.1_r1. https://code.google.com/p/android/issues/detail?id=160824
  • iOS 10 support

    Unsolved
    4
    0 Votes
    4 Posts
    2k Views
    dead_manD
    @shav, thanx for solution! I'll try it. @SGaist said: Also, what do you mean by APNs does not work ? You don't receive any notifications anymore ? Sending notifications fails ? iOS not give me APNs token. In new API token request must use UserNotifications.framework: UNUserNotificationCenter* center = [UNUserNotificationCenter currentNotificationCenter]; [center requestAuthorizationWithOptions:(UNAuthorizationOptionAlert + UNAuthorizationOptionSound) completionHandler:^(BOOL granted, NSError * _Nullable error) { // Enable or disable features based on authorization. }]; I implement APNs in my QIOSApplicationDelegate
  • Android: Please add QWebEngineView

    Unsolved
    3
    0 Votes
    3 Posts
    1k Views
    SGaistS
    Hi and welcome to devnet, Wrappers around a native web view can be found in the QtWebView module.
  • Specifying which library to use for iOS/Simulator/MacOS

    Solved ios qmake xcode
    4
    0 Votes
    4 Posts
    1k Views
    D
    @sandy.martel23 thank you very much!
  • How can I setup beaglebone black or sabre sd for first time development?

    Unsolved
    5
    0 Votes
    5 Posts
    928 Views
    bcanB
    @raven-worx I didn't find the tool but tried every format to make it bootable. Result didn't change.
  • "QMediaRecorder::PausedState is not supported on Android"

    Unsolved
    1
    0 Votes
    1 Posts
    290 Views
    No one has replied
  • Connection Problem with Sabre Automative Board

    Unsolved
    2
    0 Votes
    2 Posts
    592 Views
    SGaistS
    Hi and welcome to devnet, How did you install Qt in the first place ?