Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Solved unable to turn off grid lines of QLogValueAxis

    General and Desktop
    2
    8
    571
    Loading More Posts
    • 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.
    • JoeCFD
      JoeCFD last edited by

      I tried to call setGridLineVisible(false) and it does not work. Any idea? Thanks in advance.

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        You should post a minimal compilable example that reproduces this.

        By the way, what version of Qt are you using ?

        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 Reply Quote 1
        • JoeCFD
          JoeCFD last edited by JoeCFD

          I am testing this example
          https://doc.qt.io/qt-5/qtcharts-logvalueaxis-main-cpp.html

          I can turn off the grid lines of x axis, but y axis.
          I am using Q5-5.11.1

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            @JoeCFD said in unable to turn off grid lines of QLogValueAxis:

            setGridLineVisible(false)

            You need to add yAxis->setMinorGridLineVisible(false);

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

            SGaist 1 Reply Last reply Reply Quote 0
            • SGaist
              SGaist Lifetime Qt Champion last edited by

              Or remove the setMinorTickCount call.

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

              JoeCFD 1 Reply Last reply Reply Quote 0
              • JoeCFD
                JoeCFD @SGaist last edited by

                @SGaist Thanks for your reply. It is the same as to set tick count to 0. But I want to keep the ticks and hide the lines.

                1 Reply Last reply Reply Quote 0
                • SGaist
                  SGaist Lifetime Qt Champion @SGaist last edited by

                  @SGaist said in unable to turn off grid lines of QLogValueAxis:

                  You need to add yAxis->setMinorGridLineVisible(false);

                  So that one ?

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

                  JoeCFD 1 Reply Last reply Reply Quote 0
                  • JoeCFD
                    JoeCFD @SGaist last edited by

                    @SGaist said in unable to turn off grid lines of QLogValueAxis:

                    @SGaist said in unable to turn off grid lines of QLogValueAxis:

                    You need to add yAxis->setMinorGridLineVisible(false);

                    So that one ?

                    This works fine. Thanks a lot. Have a good one.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post