Results 1 to 3 of 3

Thread: Problem using Flickable in QML?

  1. #1
    Join Date
    Oct 2013
    Location
    VietNam
    Posts
    41
    Thanks
    3
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Windows Android

    Question Problem using Flickable in QML?

    I create simple example using flickable and I had problem:
    I only want image show in Flickable Area. Outside Flickable Area, image is hide.
    It's show in image below.
    Qt Code:
    1. ApplicationWindow {
    2. title: qsTr("Hello World")
    3. width: 640
    4. height: 480
    5. visible: true
    6. Rectangle{
    7. id: main
    8. anchors.fill: parent
    9. color: "orange"
    10. }
    11.  
    12. Flickable {
    13. anchors.centerIn: main
    14. width: 200; height: 200
    15. contentWidth: image.width; contentHeight: image.height
    16.  
    17. Image {
    18. id: image;
    19. source: "qrc:///bigImage.jpg"
    20. }
    21. }
    22.  
    23. }
    To copy to clipboard, switch view to plain text mode 
    Image: https://www.dropbox.com/s/76h8n65bce...kable.jpg?dl=0

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Problem using Flickable in QML?

    Set "clip" property of the flickable to true.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Oct 2013
    Location
    VietNam
    Posts
    41
    Thanks
    3
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Windows Android

    Default Re: Problem using Flickable in QML?

    Quote Originally Posted by wysota View Post
    Set "clip" property of the flickable to true.
    Thanks so much! it's work fine.

Similar Threads

  1. Flickable mouse dragging not working
    By pconfig in forum Qt Quick
    Replies: 0
    Last Post: 14th March 2015, 13:06
  2. mousearea outside flickable not working
    By joko in forum Qt Quick
    Replies: 3
    Last Post: 15th December 2014, 16:36
  3. Flickable and mouse signal propagation
    By clousque in forum Qt Quick
    Replies: 7
    Last Post: 25th August 2014, 12:16
  4. Replies: 0
    Last Post: 7th July 2013, 02:43
  5. Replies: 0
    Last Post: 16th September 2012, 10:28

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.