Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Why FullHD is not FullHD in Boot2Qt (Apalis iMX8)?
Qt 6.11 is out! See what's new in the release blog

Why FullHD is not FullHD in Boot2Qt (Apalis iMX8)?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 1 Posters 355 Views
  • 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.
  • V Offline
    V Offline
    VitaliyBortsov
    wrote on last edited by VitaliyBortsov
    #1

    Hello.
    I am using Toradex Apalis iMX8 SOM on Apalis Evaluation Board. I connected FullHD display using HDMI->DVI adapter to evaluation board. I set the jumper for I2C to read EDID from display. Monitor show that resolution is 1920x1080@60.
    I use Boot2Qt 5.14.1 image downloaded from my Qt account page.

    Now I note that very simple QML program show that resolution is 960x540 instead of 1920x1080. What should I do to set correct resolution?

    import QtQuick 2.14
    import QtQuick.Window 2.14
    
    Window {
        visible: true
        width: 1920
        height: 1080
        title: qsTr("Hello World")
    
        Row {
            id: mainScreen
            anchors.fill: parent
            Rectangle {
                id: control
                width: 100
                height: parent.height
                border {
                    color: "black"
                    width: 1
                }
                Text {
                    width: parent.width
                    horizontalAlignment: Text.AlignHCenter
                    font.pointSize: 8
                    font.bold: true
                    text: "Control"
                }
            }
            Rectangle {
                id: plot
                width: 860 // on Desktop, second rectangle fill the rest of screen with value of 1820, but in Apalis iMX8 second rectangle is fully shown with 860
                height: parent.height
                border {
                    color: "red"
                    width: 1
                }
                Text {
                    width: parent.width
                    horizontalAlignment: Text.AlignHCenter
                    font.pointSize: 10
                    font.bold: true
                    text: "Plot"
                }
            }
        }
    }
    
    1 Reply Last reply
    0
    • V Offline
      V Offline
      VitaliyBortsov
      wrote on last edited by VitaliyBortsov
      #2

      I discover that problem is in default template from wizard while I create new QML Quick Application (main.cpp file).

      #include <QGuiApplication>
      #include <QQmlApplicationEngine>
      
      int main(int argc, char *argv[])
      {
          if (qEnvironmentVariableIsEmpty("QTGLESSTREAM_DISPLAY")) {
              qputenv("QT_QPA_EGLFS_PHYSICAL_WIDTH", QByteArray("213"));
              qputenv("QT_QPA_EGLFS_PHYSICAL_HEIGHT", QByteArray("120"));
      
              QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
          }
      
          QGuiApplication app(argc, argv);
      
          QQmlApplicationEngine engine;
          const QUrl url(QStringLiteral("qrc:/main.qml"));
          QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
                           &app, [url](QObject *obj, const QUrl &objUrl) {
              if (!obj && url == objUrl)
                  QCoreApplication::exit(-1);
          }, Qt::QueuedConnection);
          engine.load(url);
      
          return app.exec();
      }
      

      If I remove first if block then resolution is OK.

      1 Reply Last reply
      1

      • Login

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