FedoraForum.org - Fedora Support Forums and Community
Page 3 of 3 FirstFirst 1 2 3
Results 31 to 33 of 33
  1. #31
    Join Date
    Oct 2010
    Location
    Canberra
    Posts
    2,952

    Re: Debugging Techniques

    The Work-around

    Sometimes you want to use a library as it provides a lot of the functionality that you need.
    However, sometimes some of the functions don't quite work as expected.
    The solution is to find some way of working around the problem.

    In this case it is the Qt GUI library.
    There is a widget that can be used for displaying text, and it also works for simple HTML. Just the thing for displaying some nice help info.
    My program uses HTML for displaying man pages and also for Info pages. However, it also displays the result of the --help option as plain text.

    During testing I found that if I clicked on something while HTML was displayed, and then switched to plain text, it would use the font of whatever I last clicked on. The usual result was that my plain text would all be printed as though it were a HTML link.

    It was obvious that something was not being reset when I replaced the contents of the widget. As you might imagine a widget that has much of the functionality of a word processor and web browser is quite complex and uses a lot of helper classes. One of these was not being reset.

    I tried simply clearing the widget, replacing the under-lying document, setting the font, and quite a few other things - all to no avail.
    Eventually I stumbled upon a function currentCharFormat(). Adding a line of code to reset this to a default value solved the problem.

    User error. Please replace user and try again

  2. #32
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    5,168

    Re: Debugging Techniques

    Hi Ocratato,
    I'm playing the devil's advocate. Did you report the problem to the QT team?
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

  3. #33
    Join Date
    Oct 2010
    Location
    Canberra
    Posts
    2,952

    Re: Debugging Techniques

    Quote Originally Posted by lsatenstein
    Hi Ocratato,
    I'm playing the devil's advocate. Did you report the problem to the QT team?
    Not yet. I am still working with Qt4. I will test against Qt5 and if it is still a problem I will report it.

    User error. Please replace user and try again

Page 3 of 3 FirstFirst 1 2 3

Similar Threads

  1. Header Compression techniques Ethernet links
    By rpdumps in forum Using Fedora
    Replies: 0
    Last Post: 30th June 2008, 06:58 PM

Posting Permissions

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