Qt application CSS "debugger" needed



  • I'm new to Qt, but for many years I have done (amongst other things) much HTML & CSS. I see that Qt works via "stylesheets" for styling application elements.

    What Qt needs ( ! ;-) ) is a client-side, runtime "debugger" --- or "visualizer" + "show info" --- for its applications.

    What I mean is (a part of) what all web browsers (Chrome, FF, IE, Edge) give you via "F10 debug tools" where they are showing the HTML elements on a page and their properties. You can click the mouse on something, and you will see which element it is and its box model coordinates, attributes etc. set via styles or however. This has been absolutely invaluable to all HTML developers in understanding & correcting what they are doing with layout. It would require an (optional) equivalent of "F10" and "going into click-for-info mode" to be available from a Qt app.

    :)


  • Lifetime Qt Champion

    Hi,

    That kind of feature request will be lost here as it's a forum. You should rather check the bug report system to see if there's something related.

    IIRC, you can use Designer to render a preview of what you are currently doing which should also include style sheet.


  • Qt Champions 2016

    Hi
    I think it was never included as heavy styling via stylesheets was not
    the intended way to go with desktop applications. (unlike html pages)
    You can write a custom style
    http://doc.qt.io/qt-5/qtwidgets-widgets-styles-example.html

    But yeah, more info about stylesheet use would be cool as even
    Designer shows the actual effect, its not clear what widgets that does have
    stylesheet on them. However, using one stylesheet on the application,
    somewhat makes this more simple and you are sure that all widgets are affected.

    For examining the structure of the app ( not so much stylesheets)
    there is
    https://www.kdab.com/development-resources/qt-tools/gammaray/



  • @mrjj
    Wow to the free GammaRay thing!

    I think it was never included as heavy styling via stylesheets was not
    the intended way to go with desktop applications. (unlike html pages)

    That has given me some food for thought. Been doing too much HTML/CSS/JS! Thank you.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.