Results 1 to 2 of 2

Thread: How to load URL w/o specifyign it in the .qml file?

  1. #1
    Join Date
    Apr 2012
    Posts
    3
    Qt products
    Qt4 Qt/Embedded

    Default How to load URL w/o specifyign it in the .qml file?

    Using qtquick, how can I specify the url to load w/o specifying it in the .qml file? Using the old widget interface I could simply call webview.load(url); but I havne't found anything similar with qtquick. If I specify the url in a .qml file, it loads correctly but I need to handle a url specified on the command line.

    Thanks in advance.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to load URL w/o specifyign it in the .qml file?

    You can expose the url as a property of the root context of the qt quick engine. See QDeclarativeEngine, QDeclarativeContext and QDeclarativeContext::setContextProperty().
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. How to load My own .cur file and set cursor
    By AKB48 in forum Qt Programming
    Replies: 2
    Last Post: 13th December 2016, 00:49
  2. Can Qwebview load xml/xsl file?
    By richardander in forum Qt Programming
    Replies: 3
    Last Post: 26th August 2015, 22:36
  3. Load from a file to QSqlTableModel
    By dd44 in forum Qt Programming
    Replies: 4
    Last Post: 28th August 2012, 16:02
  4. How to load a .h or .cpp file in designer?
    By srohit24 in forum Qt Programming
    Replies: 2
    Last Post: 18th February 2009, 13:33
  5. Load ActiveX from file
    By Passer_dj in forum Qt Programming
    Replies: 1
    Last Post: 13th August 2007, 23:24

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.