Results 1 to 7 of 7

Thread: Problem with QDesktopServices

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Problem with QDesktopServices

    I suggest you decode the percentage notation before sending the request to desktop services. Filing a bug report to Qt Software might be a good thing to do as well.

  2. #2
    Join Date
    Oct 2008
    Posts
    16
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Thumbs up Re: Problem with QDesktopServices

    Thanks - it works now

    Just in case anyone else has the same problem:
    Qt Code:
    1. QByteArray data = model()->data(currentIndex(),Qt::UserRole).toByteArray();
    2. QUrl url = QUrl::fromEncoded(data);
    3.  
    4. if (url.isValid())
    5. QDesktopServices::openUrl(url);
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Very strange socket programming problem
    By montylee in forum Qt Programming
    Replies: 5
    Last Post: 11th November 2008, 12:05
  2. Problem in using QHttp with QTimer
    By Ferdous in forum Newbie
    Replies: 2
    Last Post: 6th September 2008, 12:48
  3. Weird problem: multithread QT app kills my linux
    By Ishark in forum Qt Programming
    Replies: 2
    Last Post: 8th August 2008, 09:12
  4. Steps in solving a programming problem?
    By triperzonak in forum General Programming
    Replies: 8
    Last Post: 5th August 2008, 08:47
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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
  •  
Qt is a trademark of The Qt Company.