Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Blue drop on android with QComboBox using
Forum Updated to NodeBB v4.3 + New Features

Blue drop on android with QComboBox using

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
5 Posts 3 Posters 683 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.
  • R Offline
    R Offline
    Russian Happy Seal
    wrote on last edited by Russian Happy Seal
    #1

    Good day!

    I have some trouble with using QComboBox on android device: sometimes after touching combobox blue drop is appeared on screen in strange position, like on the screenshot:

    0_1560701060136_Screenshot_20190616_183448_org.qtproject.example.TelemakDevice.jpg

    What's wrong with it?

    Qt Creator 4.9.1 (based on Qt 5.12.3).

    Compilator Android for arm64-v8a (Clang Qt 5.12.3 for Android ARM64-v8a) or Android for armeabi-v7a (Clang Qt 5.12.3 for Android ARMv7) (both have same result)

    Phone Huawei Mate 10 Pro on Android 9.0

    jsulmJ 1 Reply Last reply
    0
    • R Russian Happy Seal

      Good day!

      I have some trouble with using QComboBox on android device: sometimes after touching combobox blue drop is appeared on screen in strange position, like on the screenshot:

      0_1560701060136_Screenshot_20190616_183448_org.qtproject.example.TelemakDevice.jpg

      What's wrong with it?

      Qt Creator 4.9.1 (based on Qt 5.12.3).

      Compilator Android for arm64-v8a (Clang Qt 5.12.3 for Android ARM64-v8a) or Android for armeabi-v7a (Clang Qt 5.12.3 for Android ARMv7) (both have same result)

      Phone Huawei Mate 10 Pro on Android 9.0

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Russian-Happy-Seal said in Blue drop on android with QComboBox using:

      What's wrong with it?

      I don't know - you did not explain much. You did not provide any code and you did not explain how you actually show this blue drop.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Russian Happy Seal
        wrote on last edited by Russian Happy Seal
        #3

        @jsulm Cause where is no code.

        I created new QtWidget project with one MainWindow, added on it QComboBox with some items and build it.

        After that I started app on my android device and clicked several times on combobox and it's items. Some of this clicks generated this blue drop, like on the screen.

        1 Reply Last reply
        0
        • R Offline
          R Offline
          Russian Happy Seal
          wrote on last edited by
          #4

          A little update: it's happened only after click on QComboBox's item.

          On google nexus tablet (Android 6.0.1) the same problem.

          1 Reply Last reply
          0
          • P Offline
            P Offline
            PentaPanda
            wrote on last edited by
            #5

            Here is my Solve:

            class AndroidItemModel : public QStandardItemModel {
            Q_OBJECT
            public:
            AndroidItemModel(QObject *parent = nullptr): QStandardItemModel(parent) {}
            Qt::ItemFlags flags(const QModelIndex &index) const override {
            if (!index.isValid()) {return Qt::NoItemFlags;}
            return Qt::ItemIsSelectable | Qt::ItemIsEnabled;
            }
            };

            QComboBox * cb = new QComboBox();
            cb ->setModel(new AndroidItemModel());

            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