Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QtonPi - Screen Dimensions / Reconnect HDMI

QtonPi - Screen Dimensions / Reconnect HDMI

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 3 Posters 2.5k Views 1 Watching
  • 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.
  • N Offline
    N Offline
    neuni
    wrote on last edited by
    #1

    Hello,

    I downloaded the lastest QtonPi-Image and installed it. Everything works fine and the animations run great with only 30% CPU usage.
    There are only two problems I need assistance with:

    1. Is it possible to detect the screen height and width? (resolution of the screen)
      I have to set width/height of my root element to fit the screen, otherwise it will be positioned bottom left and the rest of the screen is black. In main.cpp I use "view.showFullScreen();", but I still have to set the dimensions.

    2. When I unplug the HDMI-Cable or turn off the screen and turn it on again, there is no signal. Is it possible to (re-)detect the HDMI-screen when pluggin in / turning on the screen? (Probably this is more a linux based problem?)

    Thanks!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sidewinder
      wrote on last edited by
      #2

      [quote author="neuni" date="1347451178"]... In main.cpp I use "view.showFullScreen();", but I still have to set the dimensions.
      [/quote]

      Have you tried setting "resizeMode":http://qt-project.org/doc/qt-4.8/qdeclarativeview.html#resizeMode-prop to "SizeRootObjectToView":http://qt-project.org/doc/qt-4.8/qdeclarativeview.html#ResizeMode-enum?

      "Never memorize what you can look up in books."
      Albert Einstein

      1 Reply Last reply
      0
      • N Offline
        N Offline
        neuni
        wrote on last edited by
        #3

        My main.cpp:
        @#include <QtGui>
        #include <QtQuick>

        int main(int argc, char *argv[])
        {
        QGuiApplication app(argc, argv);
        QQuickView view;

        view.setSource(QUrl(QCoreApplication::applicationDirPath() + "/qml/main.qml"));
        view.setResizeMode(QQuickView::SizeRootObjectToView);
        
        view.showFullScreen();
        
        return app.exec();
        

        }
        @

        Puristic...it's more JS and QML.

        1 Reply Last reply
        0
        • J Offline
          J Offline
          JonWaite
          wrote on last edited by
          #4

          Did you ever get this to work? I'm having the same issue.

          1 Reply Last reply
          0
          • N Offline
            N Offline
            neuni
            wrote on last edited by
            #5

            No, I never got this to work.
            I used the bakepi-script to build my own raspbian/qt5 image. Now everything works fine.

            The latest script is very easy to use: https://gitorious.org/bakeqtpi

            There are also many messages regarding the script at this mailing list:
            http://lists.qt-project.org/pipermail/qtonpi/2012-October/thread.html

            1 Reply Last reply
            0

            • Login

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