Results 1 to 2 of 2

Thread: QML PieMenu creation error

  1. #1
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default QML PieMenu creation error

    I have following QML PieMenu, based on it's docs:
    Qt Code:
    1. import QtQuick 2.10
    2. import QtQuick.Layouts 1.3
    3. import QtQuick.Controls 2.3
    4. import QtQuick.Extras 1.4
    5.  
    6. PieMenu
    7. {
    8. signal ueSignalRFIDOperationInfo();
    9. signal ueSignalRFIDOperationPair();
    10. signal ueSignalRFIDOperationIgnore();
    11. signal usSignalRFIDOperationDelete();
    12.  
    13. MenuItem
    14. {
    15. text: qsTr("Info")
    16.  
    17. onTriggered:
    18. {
    19. ueSignalRFIDOperationInfo();
    20. } // onTriggered
    21. } // MenuItem
    22.  
    23. MenuItem
    24. {
    25. text: qsTr("Pair")
    26.  
    27. onTriggered:
    28. {
    29. ueSignalRFIDOperationPair();
    30. } // onTriggered
    31. } // MenuItem
    32.  
    33. MenuItem
    34. {
    35. text: qsTr("Ignore")
    36.  
    37. onTriggered:
    38. {
    39. ueSignalRFIDOperationIgnore();
    40. } // onTriggered
    41. } // MenuItem
    42.  
    43. MenuItem
    44. {
    45. text: qsTr("Delete")
    46.  
    47. onTriggered:
    48. {
    49. usSignalRFIDOperationDelete();
    50. } // onTriggered
    51. } // MenuItem
    52. } // PieMenu
    To copy to clipboard, switch view to plain text mode 
    Because of it, my app crashes:
    W/libRFIDMonitorApp.so(17663): (null):0 ((null)): QQmlApplicationEngine failed to load component
    W/libRFIDMonitorApp.so(17663): (null):0 ((null)): qrc:/main.qml:69 Type UeQMLDelegates.UeDelegateBtDiscoveredDevices unavailable
    W/libRFIDMonitorApp.so(17663): qrc:/gui/elements/delegates/UeDelegateBtDiscoveredDevices.qml:122 Type UeQMLElements.UeRFIDOperationMenu unavailable
    W/libRFIDMonitorApp.so(17663): qrc:/gui/elements/UeRFIDOperationMenu.qml:13 Cannot assign object to list property "menuItems"
    Now, if I exclude this menu from app, the app works. I've built the PieMenu according to docs, so, what am I missing? I am using Qt 5.10 Opensource on ArchLinux, deploying app to Android 4.2.2.
    Qt 5.3 Opensource & Creator 3.1.2

  2. #2
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: QML PieMenu creation error

    I've managed to solve the problem. I've included:
    Qt Code:
    1. import QtQuick.Controls 2.3
    To copy to clipboard, switch view to plain text mode 
    instead of
    Qt Code:
    1. import QtQuick.Controls 1.4
    To copy to clipboard, switch view to plain text mode 
    It works now, however, can someone explain me these import "versions". Why higher version does not support MenuItem and lower does?
    Qt 5.3 Opensource & Creator 3.1.2

Similar Threads

  1. PieMenu
    By vuletic in forum Qt Quick
    Replies: 0
    Last Post: 4th October 2015, 21:34
  2. QFileInfo Creation
    By QbelcorT in forum Qt Programming
    Replies: 3
    Last Post: 17th June 2009, 10:01
  3. Msi Creation
    By navi1084 in forum Installation and Deployment
    Replies: 1
    Last Post: 30th December 2008, 14:18
  4. database creation error appeared...
    By GreyGeek in forum Qt Programming
    Replies: 0
    Last Post: 14th December 2007, 14:43
  5. method creation
    By MarkoSan in forum Newbie
    Replies: 6
    Last Post: 30th May 2007, 09:47

Tags for this Thread

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.