Home Qt Quick MeeGo Harmattan Graphics Bugs (workaround)

Qt Quick MeeGo Harmattan Graphics Bugs (workaround)

 
qt-logo-300x300-MeeGoExperts
This is MeeGo Harmattan Graphics bug that appeared on Developer.Qt.Nokia that was highlighted by @NikRolls with regards to a Graphics bug that exists in Qt Quick for MeeGo Harmattan:
Using the Qt Quick Application wizard in the current edition of Qt Creator creates Harmattan apps with a few graphical bugs and artifacts:

  1. When loading the application only fills part of the screen while sliding into view
  2. If loading or bringing the application to foreground while the screen is locked or the device is in landscape a dummy toolbar and statusbar get locked in landscape mode
  3. If loading or bringing the application to foreground while the application is in portrait, the left-hand part of the statusbar gets stuck in the corner when you rotate the device to landscape

 
This is due to a single line in the qmlapplicationviewer code which is created by the Qt Creator wizard, and fortunately it’s easy to fix.

Workaround

  1. Open your project, expand the qmlapplicationviewer sub-project, expand sources and then open qmlapplicationviewer.c.
  2. Find the QmlApplicationViewer::showExpanded() function:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    void QmlApplicationViewer::showExpanded()
    {
    #ifdef Q_OS_SYMBIAN
        showFullScreen();
    #elif defined(Q_WS_MAEMO_5)
        showMaximized();
    #else
        show();
    #endif
    }
  3. Change it to match the below version:
    1
    2
    3
    4
    5
    6
    7
    8
    void QmlApplicationViewer::showExpanded()
    {
    #if defined(Q_WS_MAEMO_5)
        showMaximized();
    #else
        showFullScreen();
    #endif
    }
  4. Save and rebuild your project

What does this do?

It simply maximises the application before Harmattan begins to slide it into view. The original code would skip past the #ifdef to reach theshow(); command, meaning it would open with no size definitions; then Harmattan would slide it into view and then resize it as per the UX guidelines.
Additionally the landscape artifacts seem to be created because the application has not been properly maximised — the above fix also fixes this issue.
Is this a bug in the qmlapplicationviewer code or in Harmattan itself? Whatever the case this is a fix until it is officially changed in one area or another.
 
via Qt Developer via Twitter

About ReadWrite’s Editorial Process

The ReadWrite Editorial policy involves closely monitoring the tech industry for major developments, new product launches, AI breakthroughs, video game releases and other newsworthy events. Editors assign relevant stories to staff writers or freelance contributors with expertise in each particular topic area. Before publication, articles go through a rigorous round of editing for accuracy, clarity, and to ensure adherence to ReadWrite's style guidelines.

Get the biggest tech headlines of the day delivered to your inbox

    By signing up, you agree to our Terms and Privacy Policy. Unsubscribe anytime.

    Tech News

    Explore the latest in tech with our Tech News. We cut through the noise for concise, relevant updates, keeping you informed about the rapidly evolving tech landscape with curated content that separates signal from noise.

    In-Depth Tech Stories

    Explore tech impact in In-Depth Stories. Narrative data journalism offers comprehensive analyses, revealing stories behind data. Understand industry trends for a deeper perspective on tech's intricate relationships with society.

    Expert Reviews

    Empower decisions with Expert Reviews, merging industry expertise and insightful analysis. Delve into tech intricacies, get the best deals, and stay ahead with our trustworthy guide to navigating the ever-changing tech market.