Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [Solved] N950 QML element problem
Qt 6.12 LTS is out! See what's new in the release blog

[Solved] N950 QML element problem

Scheduled Pinned Locked Moved Mobile and Embedded
18 Posts 4 Posters 9.8k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hi,
    I have two issues with N950 app : 1) There is a lot of screen space which needs to be filled. I guess SVG graphics will help me fill up varying screen size.
    2)QML elements don't stay in place. Pl see the difference between the N8 sticky pad and N950 sticky pad letters in the attached screen shot. As you see the text in N950 has moved off the pad despite the fact that the text has been parented to sticky pad image
    Has any one faced this problem? Found any solution? Please share . Thanks!
    http://imageshack.us/photo/my-images/684/nokian950003.png/
    (N950 SCREEN SHOT)!
    http://imageshack.us/photo/my-images/16/n8insulincalc.jpg/
    (N8 SCREEN SHOT)!

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      The images show the problem, but without code it will be difficult to point out the problem..

      Through the part of code that creates sticky note, its anchoring part, and the text element..

      1 Reply Last reply
      0
      • AlicemirrorA Offline
        AlicemirrorA Offline
        Alicemirror
        wrote on last edited by
        #3

        Hi seenu188,

        sure the best is to see the code, say Vijay but the problem seems to be about the different resolution of the two devices. Using the last Qt-Quick common widgets (independently by their graphic features) you can access to the QML Screen element. See the documentation because it contains a set of really useful information related not only to device screen size, orientation (angle of) and width/height pixel data but also dpi and density. This means that you can scale or resize of do whathever you want on your images (your screenshots seems created from vector graphic objects) so they fill the screen following a logic and not fuzzy behavior.

        The fact is that the same screen size, with different resolution can have a different pixel density (I can move your same problem to my E7 device vs. N950/QEMU) and see the same. Yours seems to be a problem of geometry and not of pixel size only.

        let me know if this help in your problem. Cheers.

        Enrico Miglino (aka Alicemirror)
        Balearic Dynamics
        Islas Baleares, Ibiza (Spain)
        www.balearicdynamics.com

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          Thank you Vijay and Alicemirror. The problem is definitely due to resolution as the coding has not changed much between N8 and N950. I will read up on Harmattan Qt components and see if I can solve the issue. I am also trying to see whether rotating the text element has any effect on the position difference between N8 stick pad and N950 sticky pad.
          I will keep you posted on the results
          Thanks

          1 Reply Last reply
          0
          • ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #5

            My doubt is that.. if you have anchored your text to the stick note, it should work well does not matter the resolution. Are you anchoring your text well??

            1 Reply Last reply
            0
            • ? Offline
              ? Offline
              A Former User
              wrote on last edited by
              #6

              Hi,
              I do believe I anchored it properly.
              Here's my anchoring code. The 'Storage' is database from which saved value of insulin is retrieved and showed. The sticky_txt is the text field which is anchored to the yello stick pad image (parent). I have rotated the sticky_txt value by -40 degree. I don't know if this is a problem but this is neccessary (asthetically) as I have coded the yellow sticky pad to zoom out when it is pressed.
              @Text {
              id: sticky_txt
              color: "#2922ec"
              text:Storage.getValue("valInsulin");
              rotation: -40
              wrapMode: Text.WordWrap
              anchors.rightMargin: 1
              anchors.leftMargin: 1
              anchors.topMargin: 1
              anchors.bottomMargin: 1
              anchors.fill: parent
              font.pixelSize: 12
              }@
              zoom on press code:
              @states: State {
              name: "pressed"
              when: mouse.pressed
              PropertyChanges { target: img_stickypad; rotation: 8; scale: 2 }

                              }
              
                              transitions: Transition {
                                  NumberAnimation { properties: "rotation,scale"; duration: 200 }
                              }@
              
              1 Reply Last reply
              0
              • AlicemirrorA Offline
                AlicemirrorA Offline
                Alicemirror
                wrote on last edited by
                #7

                Hello, I have received today the N950 kit so I will testh the framwork Qt-Complex for N9 (need the physical device) asap and will update you on the results.

                Enrico Miglino (aka Alicemirror)
                Balearic Dynamics
                Islas Baleares, Ibiza (Spain)
                www.balearicdynamics.com

                1 Reply Last reply
                0
                • AlicemirrorA Offline
                  AlicemirrorA Offline
                  Alicemirror
                  wrote on last edited by
                  #8

                  @wrapMode: Text.WordWrap
                  anchors.rightMargin: 1
                  anchors.leftMargin: 1
                  anchors.topMargin: 1
                  anchors.bottomMargin: 1
                  anchors.fill: parent
                  font.pixelSize: 12
                  @

                  Hi, I am not so convincted to this anchoration method. Please can you explain what you want exactly? I had problems with text anchored by all sides when the text is wordwrap. This is because you can't know a-priori when and where the text is broken.
                  Try to remove the margins one step at a time to see how the behavior changes. Wordwrap is very useful but has some problems. I have also experienced that it can no be anchored to the bottom because its bottom does not exist.

                  Enrico Miglino (aka Alicemirror)
                  Balearic Dynamics
                  Islas Baleares, Ibiza (Spain)
                  www.balearicdynamics.com

                  1 Reply Last reply
                  0
                  • ? Offline
                    ? Offline
                    A Former User
                    wrote on last edited by
                    #9

                    [quote author="Alicemirror" date="1311181045"]I have also experienced that it can no be anchored to the bottom because its bottom does not exist.
                    [/quote]
                    Thank you. You are right. I should remove the bottom anchor. I will check the anchors again but my question is why does it work perfectly with N8 and not with N950?

                    1 Reply Last reply
                    0
                    • AlicemirrorA Offline
                      AlicemirrorA Offline
                      Alicemirror
                      wrote on last edited by
                      #10

                      This software if open? can you post a working piece somewhere so I can test? Do you have the emulator of the device ?

                      Enrico Miglino (aka Alicemirror)
                      Balearic Dynamics
                      Islas Baleares, Ibiza (Spain)
                      www.balearicdynamics.com

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        mlong
                        wrote on last edited by
                        #11

                        It might be could to use "anchors.centerIn: parent" rather than anchoring to the sides. Then make sure your rotationOrigin is set to center.

                        As an aside, is your sticky note image (the parent) already rotated? Or are you rotating it as well?

                        Software Engineer
                        My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

                        1 Reply Last reply
                        0
                        • ? Offline
                          ? Offline
                          A Former User
                          wrote on last edited by
                          #12

                          THANK YOU. Duh ! anchoring centreIn worked ! In hide sight I can see why the rotated text didn't work now. I have removed the side anchors and rotation of text and though the word wrap didn't work, I have structured the text content to fit in the yellow stick pad._ but I still have no idea why earlier anchoring worked in N8 and not in N950_
                          [quote author="mlong" date="1311184172"]
                          As an aside, is your sticky note image (the parent) already rotated? Or are you rotating it as well?
                          [/quote]
                          No the parent image rotates only when it is pressed on. It zooms up 2x and rotates.
                          The sticky note in screen shot [non-zoom] shows that it is at an angle because the image is as such-the yellow pad is not straight.
                          Thanks all of you

                          1 Reply Last reply
                          0
                          • M Offline
                            M Offline
                            mlong
                            wrote on last edited by
                            #13

                            [quote author="senu188" date="1311233387"]I have removed the side anchors and rotation of text and though the word wrap didn't work, I have structured the text content to fit in the yellow stick pad.[/quote]

                            You can always set an explicit width: and height: for your Text area to enable the text to wrap properly, also.

                            Software Engineer
                            My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

                            1 Reply Last reply
                            0
                            • ? Offline
                              ? Offline
                              A Former User
                              wrote on last edited by
                              #14

                              Thank you for the suggestion. However I still find that in this app's case, I need to adjust the top margin by some amount - [parent's image - 40 ].

                              1 Reply Last reply
                              0
                              • ? Offline
                                ? Offline
                                A Former User
                                wrote on last edited by
                                #15

                                [Solved]

                                1 Reply Last reply
                                0
                                • ? Offline
                                  ? Offline
                                  A Former User
                                  wrote on last edited by
                                  #16

                                  Solved Damn I don't get it. How do you close the thread with 'Solve d' tag ?

                                  1 Reply Last reply
                                  0
                                  • AlicemirrorA Offline
                                    AlicemirrorA Offline
                                    Alicemirror
                                    wrote on last edited by
                                    #17

                                    Edit the title of your first post and change ist to [Solved] title of the post

                                    Enrico Miglino (aka Alicemirror)
                                    Balearic Dynamics
                                    Islas Baleares, Ibiza (Spain)
                                    www.balearicdynamics.com

                                    1 Reply Last reply
                                    0
                                    • ? Offline
                                      ? Offline
                                      A Former User
                                      wrote on last edited by
                                      #18

                                      Duh! Thanks.

                                      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
                                      • Unsolved