Results 1 to 2 of 2

Thread: issue with loading QML ListView through C++

  1. #1
    Join Date
    Feb 2015
    Posts
    185
    Thanks
    5
    Qt products
    Qt5
    Platforms
    MacOS X Windows

    Default Re: issue with loading QML ListView through C++

    I am trying to load a ListView defined in QML which is set as source of a QQuickWidget onto another QQuickWidget.

    The issue faced is that on first instantiation, the list is not displayed but on search through the list, the list gets displayed.

    code is attached
    HighlightList.cpp
    readwidget.cpp
    toolbar.cpp


    readwidget is loaded on QMainwindow
    read widget contains QWebEngineview, toolbar

    click 'highlight' (tool bar) -> show highlight list.

    Here the listview is shown, but the list items are not displayed.

    but on searching on the list, list items are displayed.

    kindly help me resolve the issue.

    Attached screen shots of the same
    Screen Shot 2015-07-17 at 10.51.40 AM.jpg
    Screen Shot 2015-07-17 at 10.51.54 AM.jpg
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: issue with loading QML ListView through C++

    That looks quite unnecessary complicated.

    Why not just expose the data from C++ and use it as a model in QML?

    Cheers,
    _

Similar Threads

  1. listview issue
    By joko in forum Qt Quick
    Replies: 0
    Last Post: 13th July 2015, 19:17
  2. AJAX loading issue on QGraphicsWebView
    By ejoshva in forum Newbie
    Replies: 0
    Last Post: 30th June 2015, 09:27
  3. Unity3d plugin loading issue
    By ejoshva in forum Newbie
    Replies: 5
    Last Post: 21st April 2015, 14:36
  4. QT Jpeg, Gif, Bmp loading issue
    By meraj ansari in forum Qt Programming
    Replies: 7
    Last Post: 21st May 2010, 09:33
  5. stylesheet loading issue - thread
    By talk2amulya in forum Qt Programming
    Replies: 8
    Last Post: 26th February 2009, 13:53

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.