×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2009
    Location
    Foster City, CA
    Posts
    24

    QFrame intercepts QTextBrowser's URL

    Hi,

    I have a widget that consists QFrame and QTextBrowser.
    I called frame->lower() and located QFrame at bottom of the widget and QTextBrowser is located on the QFrame.

    QTextBrowser shows URL and when I clicked it, my app launches browser.

    It works on MS-Windows but maemo.
    If I hide the QFrame, it works on maemo also.
    So I guess QFrame intercepts the clicked event for QTextBrowser on maemo.

    How can I enable the function?

    I'm using 4.6.2~git20100212-0maemo1.

    Regards,
    Kimitake

  2. #2
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: QFrame intercepts QTextBrowser's URL

    This is my test application:
    Code:
    #include <QApplication>
    #include <QFrame>
    #include <QTextBrowser>
    #include <QVBoxLayout>
    
    int main(int argc, char* argv[])
    {
        QApplication app(argc,argv);
    
        QTextBrowser *browser = new QTextBrowser;
        browser->setHtml("<b>Text</b> <a href=\"http://nokia.com/\">link</a>");
    
        QVBoxLayout *layout = new QVBoxLayout;
        layout->addWidget(browser);
    
        QFrame frame;
        frame.setFrameShape(QFrame::Box);
        frame.setLineWidth(10);
        frame.setLayout(layout);
        frame.show();
    
        return app.exec();
    }
    Last edited by divanov; 2010-03-16 at 16:04.

  3. #3
    Registered User
    Join Date
    Mar 2009
    Location
    Foster City, CA
    Posts
    24

    Re: QFrame intercepts QTextBrowser's URL

    Hi Daniil,

    Thank you for the sample code.
    I confirmed my widget also worked if I added QVBoxLayout.
    I have generated my code by QtCreator and I didn't add any layout.

    Regards,
    Kimitake

  4. #4
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: QFrame intercepts QTextBrowser's URL

    Please attach sample code in future.

Similar Threads

  1. how to redirect url in j2me
    By neha_rashi in forum Mobile Java Networking & Messaging & Security
    Replies: 5
    Last Post: 2011-07-25, 10:38
  2. Replies: 0
    Last Post: 2009-09-11, 10:00
  3. Can you review my python files...?
    By xitopodo in forum Symbian
    Replies: 6
    Last Post: 2009-06-29, 09:49
  4. WAP and URL problem
    By Paranoid_Android in forum General Messaging
    Replies: 0
    Last Post: 2008-05-28, 10:49
  5. Nokia 6600 - URL Problem
    By prashanthsmurthy in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2003-12-24, 17:35

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×