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. Problem with Qt 5.8 and El Capitan
Qt 6.11 is out! See what's new in the release blog

Problem with Qt 5.8 and El Capitan

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 1.5k Views 2 Watching
  • 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.
  • C Offline
    C Offline
    caster89
    wrote on last edited by
    #1

    I recently updated to El Capitan, but I noticed some weird behaviours on my project. :
    I have a QCombobox with images, I set the size policy setSizeAdjustPolicy(QComboBox::AdjustToContents). If I run the project on OS X 10.9.5 I get the desired result: the QCombobox is resized to show the whole image, if I run it on the computer with El Capitan instead, the Combobox stays the "standard" size.
    Similarly I had a few Qlabels in which I set the font to Wingdings, on 10.9.5 I get the desired symbols, on El Capitan on the other hand i get a normal font.
    Does anyone have any experience with Qt on El Capitan and can give me some insight on why this is?

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

      Hi and welcome to devnet,

      Can you provide a minimal compilable example that shows this behaviour ?

      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
      0
      • C Offline
        C Offline
        caster89
        wrote on last edited by
        #3

        Sure, so here is the code:
        #include "mainwindow.h"
        #include "ui_mainwindow.h"
        #include <QLabel>
        #include <QFont>
        #include <QComboBox>
        #include <QVBoxLayout>
        #include <QFontDatabase>
        #include <QDebug>
        #include <QWidget>
        #include <QIcon>

        MainWindow::MainWindow(QWidget *parent) :
        QMainWindow(parent),
        ui(new Ui::MainWindow)
        {
        ui->setupUi(this);
        QVBoxLayout *mainLayout = new QVBoxLayout();
        QWidget *mainWidget = new QWidget();
        QLabel *label1 = new QLabel();
        qDebug()<<QFontDatabase().families();
        QFont lblFont("Wingdings");
        label1->setFont(lblFont);
        label1->setText("Test text");

        QComboBox *cmbBox = new QComboBox();
        cmbBox->setIconSize(QSize(40,40));
        cmbBox->addItem(QIcon("Cpt_Bottom.png"),"");
        cmbBox->addItem(QIcon("Cpt_Top.png"),"");
        cmbBox->addItem(QIcon("Cpt_Left.png"),"");
        cmbBox->addItem(QIcon("Cpt_Right.png"),"");
        cmbBox->setSizeAdjustPolicy(QComboBox::AdjustToContents);
        cmbBox->setMinimumHeight(60);
        mainLayout->addWidget(label1);
        mainLayout->addWidget(cmbBox);
        mainWidget->setLayout(mainLayout);
        setCentralWidget(mainWidget);
        

        }

        On osx 10.9.5 I get a label with strings and a thick combobox, while on el capital I just get the string and a normal height combobox.
        Is there a way to upload images?

        mrjjM 1 Reply Last reply
        0
        • C caster89

          Sure, so here is the code:
          #include "mainwindow.h"
          #include "ui_mainwindow.h"
          #include <QLabel>
          #include <QFont>
          #include <QComboBox>
          #include <QVBoxLayout>
          #include <QFontDatabase>
          #include <QDebug>
          #include <QWidget>
          #include <QIcon>

          MainWindow::MainWindow(QWidget *parent) :
          QMainWindow(parent),
          ui(new Ui::MainWindow)
          {
          ui->setupUi(this);
          QVBoxLayout *mainLayout = new QVBoxLayout();
          QWidget *mainWidget = new QWidget();
          QLabel *label1 = new QLabel();
          qDebug()<<QFontDatabase().families();
          QFont lblFont("Wingdings");
          label1->setFont(lblFont);
          label1->setText("Test text");

          QComboBox *cmbBox = new QComboBox();
          cmbBox->setIconSize(QSize(40,40));
          cmbBox->addItem(QIcon("Cpt_Bottom.png"),"");
          cmbBox->addItem(QIcon("Cpt_Top.png"),"");
          cmbBox->addItem(QIcon("Cpt_Left.png"),"");
          cmbBox->addItem(QIcon("Cpt_Right.png"),"");
          cmbBox->setSizeAdjustPolicy(QComboBox::AdjustToContents);
          cmbBox->setMinimumHeight(60);
          mainLayout->addWidget(label1);
          mainLayout->addWidget(cmbBox);
          mainWidget->setLayout(mainLayout);
          setCentralWidget(mainWidget);
          

          }

          On osx 10.9.5 I get a label with strings and a thick combobox, while on el capital I just get the string and a normal height combobox.
          Is there a way to upload images?

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

          @caster89 said in Problem with Qt 5.8 and El Capitan:

          Is there a way to upload images?

          yes use external site and paste link here
          postimage.org as example.

          1 Reply Last reply
          0

          • Login

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