Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Problem in setting tab focus with hyperlink?



  • I have created an hyperlink using Qlabel. I am trying to show currently which hyperlink has focus. I have used
    @Qt::LinksAccessibleByKeyboard@ flag. I am getting the visually focus frame but it is not proper. It is covering the half rect of label. Why this type of problem is coming?



  • Could you show us an image of what you get?



  • [quote author="Eddy" date="1324973989"]Could you show us an image of what you get?[/quote]

    can you give some link where i can upload?



  • Of course,
    have a look at the "forum help":http://developer.qt.nokia.com/wiki/ForumHelp#9bd9c32b79efb1b2d5b039e4d48300a9.

    The forum has no means of his own at the moment, just use a link to an external public host.Personally i use dropbox.



  • I think the problem with the setting width i am checking then i will upload the image.



  • [quote author="Eddy" date="1324976242"]Of course,
    have a look at the "forum help":http://developer.qt.nokia.com/wiki/ForumHelp#9bd9c32b79efb1b2d5b039e4d48300a9.

    The forum has no means of his own at the moment, just use a link to an external public host.Personally i use dropbox.[/quote]
    Here is the image link
    http://www.imgplace.com/viewimg220/7296/46hyperlink.png
    See the dotted line above the "forgot Password"



  • The link is working, but we need to put in a password because it has restricted access. Is it possible to put it in a public place?



  • [quote author="Eddy" date="1324982697"]The link is working, but we need to put in a password because it has restricted access. Is it possible to put it in a public place?[/quote]

    no actually the image itself contains a text "password". That is confusing you.Please check it carefully.



  • Ok, you got me there ;)

    I understand now.
    What you mean is that you only get half of the dotted border.

    Is it possible to make a small compilable example that shows the problem? Then we can test it out and if it is a bug it can be used to make a bug report.



  • [quote author="Eddy" date="1324983626"]Ok, you got me there ;)

    I understand now.
    What you mean is that you only get half of the dotted border.

    Is it possible to make a small compilable example that shows the problem? Then we can test it out and if it is a bug it can be used to make a bug report.[/quote]
    Ya in case of hyperlink text made with Qlabel only this problem is coming. Once you check this i dont know what is the problem in it and one more doubt i have when i am drawing focus rect using the following code in custom button
    @ QPainter painter(this);
    QStyleOptionFocusRect option;
    option.initFrom(this);
    option.backgroundColor = palette().color(QPalette::Background);
    style()->drawPrimitive(QStyle::PE_FrameFocusRect, &option, &painter, this);@
    I am getting focus frame exactly at border. How can i get the focus frame little bit inside (1 or 2 pixels) the button?



  • What style are you using?
    What OS are you on?



  • [quote author="Eddy" date="1324985364"]What style are you using?
    What OS are you on?[/quote]
    What style? means sorry i did'nt get it. I am just painting the button over that i am setting the focus frame. Beside painting i am just using the code posted by me.
    I am working on window-xp



  • [quote author="Eddy" date="1324985364"]What style are you using?
    What OS are you on?[/quote]

    Did you tested that hyperlink?


Log in to reply