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. When using QT_SCALE_FACTOR qcombobox items cannot be clicked
Forum Updated to NodeBB v4.3 + New Features

When using QT_SCALE_FACTOR qcombobox items cannot be clicked

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 161 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.
  • A Offline
    A Offline
    AleixQ
    wrote on last edited by AleixQ
    #1

    Scaling app using this environment variable set to anything but 1 (e.g 0.5 or 2) leads to qcombobox unusable as items cannot be selected or have an offset. The same happens when adding a qdialog with Qt:Popup window flag.
    I am using Arch linux with Qt 5.15.2.
    Here is the code to test:

    #include <QApplication>
    #include <QTreeView>
    #include <QStandardItem>
    #include <QVariant>
    #include <QComboBox>
    #include <QGroupBox>
    #include <QHBoxLayout>
    #include <QVBoxLayout>
    #include <QMainWindow>
    
    int main(int argc, char *argv[])
    {
        QApplication a(argc, argv);
        QMainWindow* MainWindow = new QMainWindow();
        QGroupBox* MapPane = new QGroupBox(MainWindow);
        MapPane->setGeometry(QRect(0, 0, 694, 510));
        QVBoxLayout* verticalLayout = new QVBoxLayout(MapPane);
        QHBoxLayout *mapFilterCtrl = new QHBoxLayout();
        QComboBox *combo1 = new QComboBox(MapPane);
        QComboBox *combo2 = new QComboBox(MapPane);
        QComboBox *combo3 = new QComboBox(MapPane);
    
        QStringList fonts = { "AAAA", "BBBB", "CCCC", "DDDD" };
        combo1->addItems(fonts);
        combo2->addItems(fonts);
        combo3->addItems(fonts);
    
        mapFilterCtrl->addWidget(combo1);
        mapFilterCtrl->addWidget(combo2);
        mapFilterCtrl->addWidget(combo3);
        verticalLayout->addLayout(mapFilterCtrl);
    
        MainWindow->setCentralWidget(MapPane);
    
    
        MainWindow->show();
    
        return a.exec();
    }
    
    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