Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Runtime notification regarding stylesheet
QtWS25 Last Chance

Runtime notification regarding stylesheet

Scheduled Pinned Locked Moved Solved General and Desktop
stylesheetparsing
6 Posts 3 Posters 641 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    qt_emp
    wrote on last edited by
    #1

    During runtime as my application starts up I get "RED" notices in the application output window that says
    "cannot parse stylesheet for widget 0x0nnnnn" I could probably track this down but the id for the widget is what looks like a hex address. There are 48 of these "cannot parse" notices. Oddly enough, all of the functionality of all the widgets seems to be normal. I think but am not sure, that the widgets are qradiobuttons. Any help would be appreciated. Is there a way to decode this hex value to help me identify the widget?

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      You can install a custom message handler
      https://doc.qt.io/qt-5/qtglobal.html#qInstallMessageHandler
      and use a string check to stop on a break point when msg contains
      "cannot parse stylesheet"

      You can then inspect the call stack to see where it came from and in that way
      pinpoint which widget that triggers the message.

      https://irrundauswege.wordpress.com/2017/08/14/redirect-qdebug-to-log-file-using-qinstallmessagehandler/

      1 Reply Last reply
      1
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        The style sheet parsing error will have no influence on your widget functionality as it's cosmetic changes they act on.

        As for identifying the widget, I'd start by checking where in the code the style sheet is applied.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        1
        • Q Offline
          Q Offline
          qt_emp
          wrote on last edited by
          #4

          I'm working in QT 4.8. I see the url is in qt5. Will this still work for me?

          mrjjM 1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            If you think about be the message handler, it was already available in Qt 4.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            1
            • Q qt_emp

              I'm working in QT 4.8. I see the url is in qt5. Will this still work for me?

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by mrjj
              #6

              @qt_emp
              Hi
              Yes it will work.
              https://doc.qt.io/archives/qt-4.8/qtglobal.html#qInstallMsgHandler
              (name is slightly different. works the same as far as i know)

              1 Reply Last reply
              1

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved