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. Qt 5.2 beta 1 - iOS - Why QtQuick.Controls 1.0 can't working ?
Forum Update on Monday, May 27th 2025

Qt 5.2 beta 1 - iOS - Why QtQuick.Controls 1.0 can't working ?

Scheduled Pinned Locked Moved Mobile and Embedded
1 Posts 1 Posters 876 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.
  • T Offline
    T Offline
    Tyne Stone
    wrote on last edited by
    #1

    Hi everybody,

    I installed the 5.2.0 beta for iOS (qt-mac-opensource-5.2.0-beta1-ios-x86_64-offline.dmg),  and created a new project of Qt widgets Application. I use QtQuick 2.0 and a simple qml (inside an qrc) file to show a View; When the qml only contains the  "Quick Basic" widgets, it display fine on iphone simulator(still TextIput can't be touched and no keyboard showing up), but when add "Quick Controls" widgets it display only blank on iphone simulator, can somebody tell me why?
    

    main.cpp:
    @
    #include "mainwindow.h"
    #include <QApplication>
    int main(int argc, char *argv[])
    {
    QApplication a(argc, argv);
    MainWindow w;
    w.show();
    return a.exec();
    }
    @

    mainwindow.cpp:

    @
    #include "mainwindow.h"
    MainWindow::MainWindow(QWindow *parent) :
    QQuickView(parent)
    {
    setSource(QUrl("qrc:/main.qml"));
    }
    @

    main.qml:

    @
    import QtQuick 2.1
    import QtQuick.Controls 1.0
    Rectangle {
    width: 220
    height: 320
    Text{
    x: 80; y: 20
    width: 100
    height: 50
    text: "qml test"
    }

    TextEdit{
        x: 80; y: 80
        width: 180; height: 50
        text: "TextEdit"
    }
    
    TextInput{
        x: 80; y: 150
        width: 180; height: 50
        text: "TextInput"
    }
    
    Button{
        x: 80; y: 200
        width: 80; height: 50
        text: "button"
    }
    

    }
    @

    if qml don't use QtQuick.Controls 1.0 and Button it will run fine on iphone simulator. I build the project like this:

    1. cd project directory
    2. run ios_x86 qmake, make
      3.open the .xcodeproj with xcode, build and run with simulator
    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