Results 1 to 2 of 2

Thread: QWebView unknown problem

  1. #1

    Default QWebView unknown problem

    I'm sure that the problem is in the code but i'm really newbie in Qt and can't find it.As you can see at the code I'm trying to create a connection between a buton and the webview object but it doesnt work when i test it.I keep pushing the buton but there's no change in the page.So here's the code:

    Qt Code:
    1. #include <QApplication>
    2. #include <QMainWindow>
    3. #include "ui_test.h"
    4. int main(int argc, char *argv[])
    5. {
    6. QApplication app(argc, argv);
    7. Ui::MainWindow ui;
    8. QMainWindow *main = new QMainWindow;
    9. ui.setupUi(main);
    10. ui.webView->load(QUrl("http://www.trolltech.com/"));
    11. ui.webView->show();
    12. QObject::connect(ui.cmdBtn,SIGNAL(clicked()),ui.webView,SLOT(load(QUrl("http://www.google.com/"))));
    13. main->show();
    14. return app.exec();
    15. }
    To copy to clipboard, switch view to plain text mode 

    Please help me, if you can!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QWebView unknown problem

    You can't specify values and parameter names in SLOT() and SIGNAL() macros --- only types.

    http://www.qtcentre.org/forum/faq.ph...ot_with_values

Similar Threads

  1. Problem With QWebView
    By ivi2501 in forum Qt Programming
    Replies: 8
    Last Post: 2nd August 2009, 19:37
  2. Steps in solving a programming problem?
    By triperzonak in forum General Programming
    Replies: 8
    Last Post: 5th August 2008, 08:47
  3. Program not compiling on Fresh install of Leopard
    By dvmorris in forum Qt Programming
    Replies: 1
    Last Post: 22nd November 2007, 10:22
  4. Qt 4.2.3 Configure Issue...
    By amcdaniel in forum Installation and Deployment
    Replies: 4
    Last Post: 13th May 2007, 12:02
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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.