Results 1 to 1 of 1

Thread: Visual Runtime Error On scrolling spinner created in Qml

  1. #1
    Join Date
    May 2011
    Posts
    16
    Thanks
    3
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi PyQt3 PyQt4
    Platforms
    Windows

    Default Visual Runtime Error On scrolling spinner created in Qml

    This is the code in Qml

    Qt Code:
    1. import Qt 4.7
    2.  
    3.  
    4.  
    5. Rectangle {
    6. width:160; height:200
    7.  
    8.  
    9. property int hr
    10. property int min
    11. property int ap
    12.  
    13. signal titleBarClicked(int hr,int min,int ap)
    14.  
    15.  
    16. Row {
    17. y: 0; x: 0; spacing: 5
    18.  
    19. Spinner {
    20. id: spinner1
    21. width: 50; height: 200
    22. focus: true
    23. model: 13
    24. itemHeight: 30
    25.  
    26. delegate: Text { font.pixelSize:25;text: index; height: 30 }
    27.  
    28. }
    29. // Text { text: "Current item index: " + spinner1.currentIndex }
    30.  
    31.  
    32. }
    33. Row {
    34. y: 0; x:50; spacing: 20
    35.  
    36. Spinner {
    37. id: spinner2
    38. width: 60; height: 200
    39. focus: true
    40. model: 60
    41. itemHeight: 30
    42. delegate: Text { font.pixelSize:25;text: index; height: 30 }
    43.  
    44.  
    45. }
    46.  
    47. //Text { text: "Current item index: " + spinner2.currentIndex }
    48. }
    49. Row {
    50. y: 0; x: 110; spacing: 20
    51.  
    52. Spinner {
    53. id: spinner3
    54. width: 60; height: 200
    55. focus: true
    56.  
    57. model: name,
    58. name1
    59. Text {
    60. id: name
    61. text:"PM"
    62. font.pixelSize:25
    63. }
    64. Text {
    65. id: name1
    66. text:"AM"
    67. font.pixelSize:25
    68.  
    69.  
    70. }
    71.  
    72.  
    73. itemHeight: 30
    74. delegate: Text { font.pixelSize:25;text:name; height: 30 }
    75. Text { font.pixelSize:25;text:name1 ; height: 30 }
    76. MouseArea{ anchors.fill : parent ;
    77. hoverEnabled: true
    78. acceptedButtons: Qt.LeftButton
    79.  
    80. onReleased :
    81. {
    82. titleBarClicked(spinner1.currentIndex,spinner2.currentIndex,spinner3.currentIndex)
    83.  
    84. console.log("First currentIndex = "+ spinner1.currentIndex )
    85. console.log("Second currentIndex = "+ spinner2.currentIndex )
    86. console.log("currentIndex = "+ spinner3.currentIndex )
    87. }
    88. }
    89.  
    90. }
    91.  
    92. //Text { text: "Current item index: " + spinner3.currentIndex }
    93. }
    94.  
    95.  
    96. Keys.onEnterPressed:{
    97. titleBarClicked(spinner1.currentIndex,spinner2.currentIndex,spinner3.currentIndex)
    98. console.log("First currentIndex = "+ spinner1.currentIndex )
    99. console.log("Second currentIndex = "+ spinner2.currentIndex )
    100. console.log("currentIndex = "+ spinner3.currentIndex )
    101. }
    102.  
    103. }
    To copy to clipboard, switch view to plain text mode 


    This is the Function used In qT FOR qML INTEGRATION

    Qt Code:
    1. QDeclarativeView *qView=new QDeclarativeView(ui->graphicsView);
    2. qView->setSource(QString("main.qml"));
    3. QObject *obj =qView->rootObject();
    4. connect (obj,SIGNAL(titleBarClicked(int,int,int)), this, SLOT(timecal(int,int,int)));
    To copy to clipboard, switch view to plain text mode 



    Qt Code:
    1. void AlarmSet::timecal(int hr1, int min1,int ap1)
    2. {
    3.  
    4. hra=hr1;
    5. mina=min1;
    6. apa=ap1;
    7. //HERE THE VALUE IS COMING
    8. }
    To copy to clipboard, switch view to plain text mode 







    the value is coming in Qt but when we scroll more than five times , the visual runtime error occurs

    This Is the Error Displaying At the Qt Console

    QGraphicsItem::ungrabMouse: not a mouse grabber
    ASSERT: "!implicit" in file graphicsview\qgraphicsscene.cpp, line 906
    [/B][/B]
    [/SIZE]
    Last edited by high_flyer; 27th May 2011 at 12:25. Reason: code tags

Similar Threads

  1. Microsoft Visual C++- Runtime Library Error while deploying Qt Application
    By mammaiap in forum Installation and Deployment
    Replies: 1
    Last Post: 7th May 2011, 01:41
  2. Replies: 1
    Last Post: 25th September 2010, 09:20
  3. delete runtime-created widgets causes crash
    By jonasbalmer in forum Qt Programming
    Replies: 5
    Last Post: 10th February 2010, 22:36
  4. Replies: 5
    Last Post: 10th November 2009, 16:46

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.