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. QSlider problem in Android 6.0

QSlider problem in Android 6.0

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
5 Posts 2 Posters 1.7k Views 1 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.
  • G Offline
    G Offline
    Gourmet
    wrote on last edited by
    #1

    Year ago I have made decorated slider deriving from QSlider. I did not have problems with it until now. Now I created app with it for newer versions of Android. And found strangle problem - if I build app for target platform Android 6 (API 23) then on Android 6 smartphone my slider doesn't move. All my functions work properly but I see value() does not change when trying move slider. Knob stalls hard.

    I must tell, I use unusual technique for this app - I create QGraphicsScene, then place controls on it using proxy items, then I scale scene to Android screen size. Little weird but all worked fine before this slider problem. I have created set of decorated controls - buttons, rotating knobs, moving SVG graphics and so on. All worked fine. Even my slider worked fine in previous versions of Android. Here is compatibility table for my slider with different APIs build and different Android OS versions:

    Build for min and max API 15, run on Android 4.1 - works fine
    Build for min and max API 15, run on Android 6.0 - works fine
    Build for min API 16, max API 23, run on Android 4.1 - works fine
    Build for min API 16, max API 23, run on Android 6.0 - doesn't work

    Even I tried add native QSLider to my app - and found another problem. The QSlider works in Android 6 and 4.1 but with artefacts. They look little different on different screen resolutions. Only part of knob moves. This part has size equal to original knob size before scaling. Probably this is an error in proxy item scale algorithm.

    May be somebody knows some workarounds for QSlider in Android... May be this is already known issue... I did not find yet anything about this in Internet.

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

      Hi,

      What version of Qt are you using ?
      Does it also happen on desktop ?
      Is it possible to share your custom slider code ?

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

      G 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        What version of Qt are you using ?
        Does it also happen on desktop ?
        Is it possible to share your custom slider code ?

        G Offline
        G Offline
        Gourmet
        wrote on last edited by Gourmet
        #3

        @SGaist

        • 5.6.1
        • No, even in QtCreator I made plugin with same code - it works fine (Linux Kubuntu)
        • No. I do not think C++ code contains something wrong - it works in most environments. Probably I have change something in AndroidMainfest.xml. I am not a keen in it's content. It already containes lines for permissions:

        <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
        <uses-permission android:name="android.permission.RECORD_AUDIO"/>
        <uses-permission android:name="android.permission.WAKE_LOCK"/>
        <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
        <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

        Line for different screen resolutions:

        <supports-screens android:largeScreens="true" android:xlargeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>

        May be this is about styles?

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

          Can you test with a more recent version of Qt ? The current LTS is 5.9.2 with 5.10 around the corner.

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

          G 1 Reply Last reply
          0
          • SGaistS SGaist

            Can you test with a more recent version of Qt ? The current LTS is 5.9.2 with 5.10 around the corner.

            G Offline
            G Offline
            Gourmet
            wrote on last edited by
            #5

            @SGaist now I cannot. I have finish main job first. In application I replaced decorated sliders by my own decorated buttons and dialers. This works for current release. It will be done then I will be able test more.

            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