Results 1 to 3 of 3

Thread: Model Window not showing in Android

  1. #1
    Join Date
    Oct 2013
    Posts
    142
    Thanks
    36
    Thanked 3 Times in 3 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Model Window not showing in Android

    Can anyone help me understand why the following code doesn't work on Android?

    Qt Code:
    1. import QtQuick 2.5
    2. import QtQuick.Controls 1.4
    3. import QtQuick.Window 2.0
    4.  
    5. ApplicationWindow {
    6. id: mainWindow
    7. visible: true
    8. height: 800
    9. width: 600
    10. x: 0
    11. y: 0
    12. title: qsTr("Test")
    13. color: "blue"
    14.  
    15. Window {
    16. id: searchLocationWindow
    17. visible: true
    18. height: mainWindow.height
    19. width: mainWindow.width
    20. x: mainWindow.x
    21. y: mainWindow.y
    22. color: "green"
    23. modality: Qt.ApplicationModal
    24. }
    25. }
    To copy to clipboard, switch view to plain text mode 

    It works on Ubuntu 16.04.1 AMD64, but on Android the "searchLocationWindow" doesn't show at all, it's opened because it doesn't receive the "back" command but it isn't visible.
    Tried with both Qt 5.5.1 and Qt 5.6.2 on Android 5.0.1

  2. #2
    Join Date
    Oct 2013
    Posts
    142
    Thanks
    36
    Thanked 3 Times in 3 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Model Window not showing in Android

    Meant Modal Window, would be nice to be able to modify title.

    Apparently Dialog works ok, yet it is still strange why Window wouldn't work.

  3. #3
    Join Date
    Oct 2013
    Posts
    142
    Thanks
    36
    Thanked 3 Times in 3 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Model Window not showing in Android

    From what I have learned over my search throughout the internet, in Android, applications can have only 1 Window so I must use Dialogs to do my bidding.

Similar Threads

  1. Showing custom dialogs on Android
    By sedi in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 5th September 2016, 21:40
  2. Showing Android keyboard from QML TextField
    By MarkoSan in forum Qt Quick
    Replies: 4
    Last Post: 20th January 2016, 07:48
  3. Get window size prior to showing window?
    By mortoray in forum Qt Programming
    Replies: 0
    Last Post: 13th January 2011, 17:52
  4. QListView not showing all items in the model
    By mclark in forum Qt Programming
    Replies: 13
    Last Post: 2nd September 2010, 22:07
  5. Replies: 4
    Last Post: 7th August 2009, 22:09

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.