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. Table header font shape is different between Windows OS and Raspberry Pi

Table header font shape is different between Windows OS and Raspberry Pi

Scheduled Pinned Locked Moved Unsolved General and Desktop
11 Posts 4 Posters 628 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.
  • I Offline
    I Offline
    IknowQT
    wrote on 10 Feb 2022, 06:59 last edited by IknowQT 2 Oct 2022, 08:44
    #1
    • Raspberry
      3593127f-a78b-402e-a25c-13c71b1df6c4-image.png

    I increased the header font size on Raspberry Pi.
    The actual font is not stretched, but the positions are stretched.

    *Window
    ee8e175c-27c7-4bc1-8023-7d7d75250c52-image.png

    The following is when the same code is executed in Windows.
    You can check that the font is applied normally.

    Why does the difference occur?

    If the two OSs have the same shape, the code can be questioned, but is the OS different if the two OSs have the same shape?

    *Add
    For reference, I am using QAbstractTableModel.

    https://stackoverflow.com/questions/30111992/how-to-modify-header-font-size-in-qtableview-osx-specific

    There are several people who have a similar situation to me.
    Is this a bug in qt?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 10 Feb 2022, 20:31 last edited by
      #2

      Hi,

      You should add:

      • Qt version
      • Linux distributions
      • Desktop environment

      Both on your desktop and RPi.

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

      I 1 Reply Last reply 10 Feb 2022, 23:08
      0
      • S SGaist
        10 Feb 2022, 20:31

        Hi,

        You should add:

        • Qt version
        • Linux distributions
        • Desktop environment

        Both on your desktop and RPi.

        I Offline
        I Offline
        IknowQT
        wrote on 10 Feb 2022, 23:08 last edited by
        #3

        @SGaist

        Qt version: 5.15.2
        Linux distributions: Ubuntu 20.04.3 LTS
        Desktop environment: window10

        1 Reply Last reply
        0
        • C Offline
          C Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on 11 Feb 2022, 05:49 last edited by
          #4

          I doubt there is the same data - in one screenshot you've 'WaveLength', in the other 'WaveLength5' - maybe there are linebreaks too. Make sure that you work on the same data when comparing screenshots.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          I 1 Reply Last reply 11 Feb 2022, 06:25
          0
          • C Christian Ehrlicher
            11 Feb 2022, 05:49

            I doubt there is the same data - in one screenshot you've 'WaveLength', in the other 'WaveLength5' - maybe there are linebreaks too. Make sure that you work on the same data when comparing screenshots.

            I Offline
            I Offline
            IknowQT
            wrote on 11 Feb 2022, 06:25 last edited by
            #5

            @Christian-Ehrlicher

            I have already confirmed that I have the same data.
            Putting 5 on it was just to make sure the text changes.

            1 Reply Last reply
            0
            • C Offline
              C Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on 11 Feb 2022, 06:31 last edited by
              #6

              Use a simple model (or QTableWidget) without your test application to see if it's really a program on the Qt side (which I doubt).
              Also try to start with a different style (e.g. windows) on your raspberry.

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              I 1 Reply Last reply 11 Feb 2022, 06:46
              0
              • C Christian Ehrlicher
                11 Feb 2022, 06:31

                Use a simple model (or QTableWidget) without your test application to see if it's really a program on the Qt side (which I doubt).
                Also try to start with a different style (e.g. windows) on your raspberry.

                I Offline
                I Offline
                IknowQT
                wrote on 11 Feb 2022, 06:46 last edited by
                #7

                @Christian-Ehrlicher

                I also did several tests. I tested it after running it on Ubuntu OS, but I think it is a problem on the qt side
                Because when I ran the same in Ubuntu environment, the result was the same with Raspberry. And there are several people who are raising this issue.

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  Christian Ehrlicher
                  Lifetime Qt Champion
                  wrote on 11 Feb 2022, 06:51 last edited by
                  #8

                  So did you actually run it on the raspberry pi with the windows style?

                  Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                  Visit the Qt Academy at https://academy.qt.io/catalog

                  I 1 Reply Last reply 11 Feb 2022, 07:03
                  0
                  • C Christian Ehrlicher
                    11 Feb 2022, 06:51

                    So did you actually run it on the raspberry pi with the windows style?

                    I Offline
                    I Offline
                    IknowQT
                    wrote on 11 Feb 2022, 07:03 last edited by
                    #9

                    @Christian-Ehrlicher

                    Are you referring to the desktop version of the Windows-style Raspberry Pi?
                    I'm developing in a raspberry environment on the desktop version.

                    J.HilkJ 1 Reply Last reply 11 Feb 2022, 07:28
                    0
                    • C Offline
                      C Offline
                      Christian Ehrlicher
                      Lifetime Qt Champion
                      wrote on 11 Feb 2022, 07:18 last edited by
                      #10

                      I don't understand your question.
                      You posted a screenshot with a wrong height. Start this application with the windows style and see if it's still an issue.

                      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                      Visit the Qt Academy at https://academy.qt.io/catalog

                      1 Reply Last reply
                      0
                      • I IknowQT
                        11 Feb 2022, 07:03

                        @Christian-Ehrlicher

                        Are you referring to the desktop version of the Windows-style Raspberry Pi?
                        I'm developing in a raspberry environment on the desktop version.

                        J.HilkJ Offline
                        J.HilkJ Offline
                        J.Hilk
                        Moderators
                        wrote on 11 Feb 2022, 07:28 last edited by
                        #11

                        @IknowQT first check what styles are available on your target OS

                        qDebug() << QStyleFactory::keys();
                        

                        than set it to "Windows" if available

                        QApplication app(argc, argv);
                        qDebug() << QStyleFactory::keys();
                        app.setStyle(QStyleFactory::create("Windows"));
                        

                        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                        Q: What's that?
                        A: It's blue light.
                        Q: What does it do?
                        A: It turns blue.

                        1 Reply Last reply
                        1

                        1/11

                        10 Feb 2022, 06:59

                        • Login

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