Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 Support (Qt 5) › Few minor things

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #12826

    Radek

    Note: using Ubuntu 15.10, with Qt 5.6 64bit and VPlay 2.8

     

    1. Trying to switch to android theme with shortcut (Ctrl+A or any other) doesn’t work. I have this problem in my app, but not in demo apps, launched from sample launcher.

    Error in console:
    QQuickAction::event: Ambiguous shortcut overload: Ctrl+A

    2. After app startup the only available resolution is 480×320, other options are disabled, they are enabled/disabled when I resize app window.

    3. Receiving error when I click in menu on resolution/theme option
    file:///opt/Qt/5.6/gcc_64/qml/QtQuick/Controls/Private/ScrollViewHelper.qml:186:9: QML Binding: Property ‘raised’ does not exist on Item.

    4. I have code like this:

    App {
        id: root
        NavigationStack {
            id: loginStack
            splitView: false
    
            LoginPage {
                id: loginPage
            }
        }
    
        Navigation {
            id: navigation
            enabled: false
            visible: false
    
            NavigationItem {
                id: homeItem
                title: qsTr("Home")
                icon: IconType.home
                NavigationStack {
                    splitView: false
                    HomePage {
                        id: homePage
                    }
                }
            }
    
            ...
        }
    }

     

    What I want to do is have login page first, which is not part of main navigation. So, the main navigation is hidden until user logs in. The problem I have is that using android theme, once you hide login page and show main navigation, the drawer icon doesn’t show up. If I switch to another theme and back to android, then icon is back.

    5. In component showcase app, when you change the size of the window, so that the icons in toolbar doesn’t fit anymore, one icon is getting hidden under the popup button(?), but the other still remains there. The text in popup is probably not what you want. Also, can I create custom popups like this?

    6. Do you have any plans to re-use the Qt Quick Controls 2.0?

     

    #12836

    Günther
    Felgo Team

    Hi Radek!

    1) Theme Shortcuts

    Thanks for reporting this issue! We will have a closer look why this is happening.

     

    2) Available Resolutions

    The possible resolutions to choose are limited by your screen resolution. If a resolution would exceed your screen resolution, the menu entry is disabled.

     

    3) Error when using Debug Menubar

    This is a warning that comes from out base platform Qt. It was introduced in the recent Qt version 5.6.0.
    A bug report was already filed and a fix should come for the next version Qt 5.6.1. See here for more information: Bug Report

     

    4) Login Example

    I currently can’t reproduce this issue, did you start your project with the new Login Application project template?

    You can also send us your source code to support@felgo.com, so we can have a look.

     

    5) Popup Menu

    Yes you can create custom popups. Also, you can choose whether an item is always shown, always in the popup or only if there’s not enough space.

    The title within the popup is also customizable (which we missed to do for the showcase). Have a look here: NavigationBarRow – Show More Button

     

    6. Qt Quick Controls 2.0

    Yes, we intend to use the new controls and styling features for Felgo if possible. We still need to do some research and testing to decide how to best integrate them with our current controls and Theming features.

    Cheers,
    Günther

    #12839

    Radek

    2. Then something is clearly wrong, because when I slightly resize the window, most resolution become enabled.

    http://imgur.com/2LqE6nm

     

    4. I didn’t use login template. Here is complete example, switch to android theme and click on a button, the drawer (navigation) icon doesn’t show up.

    import Felgo 3.0
    import QtQuick 2.5
    
    App {
    	id: root
    	NavigationStack {
    		id: loginStack
    
    		Page {
    			title: "Login"
    			AppButton {
    				anchors.centerIn: parent
    				text: "Show main navigation!"
    				onClicked: {
    					loginStack.enabled = false
    					loginStack.visible = false
    					navigation.enabled = true
    					navigation.visible = true
    				}
    			}
    		}
    	}
    
    	Navigation {
    		id: navigation
    		enabled: false
    		visible: false
    
    		NavigationItem {
    			id: homeItem
    			title: qsTr("Home")
    			icon: IconType.home
    			NavigationStack {
    				Page {
    					title: homeItem.title
    				}
    			}
    		}
    
    		NavigationItem {
    			id: inboxItem
    			title: qsTr("Inbox")
    			icon: IconType.envelope
    			NavigationStack {
    				Page {
    					title: inboxItem.title
    				}
    			}
    		}
    	}
    }
    

     

    5. I was thinking about popups in other areas of user interface, i.e. creating context menu when right clicking on some button.

    #12845

    Günther
    Felgo Team

    Resolutions:
    Ah, sorry – I forgot to mention that the available resolutions also consider portrait vs landscape orientation.
    So if you resize your portrait-app window to have more width than height, the options will resize the window in landscape mode. This allows to test different resolutions in both portrait and landscape mode.

     

    LoginPage:

    It seems the issue is related to the visible setting of the Navigation. As a fix, you can either use the opacity property instead of visible to show/hide the Navigation, or you never hide the Navigation and just show the LoginPage on top if it is visible.

    import Felgo 3.0
    import QtQuick 2.5
    
    App {
      id: root
      NavigationStack {
        id: loginStack
        // solution 1: show login above main navigation -> it's not necessary to set the navigation invisible now
        z: 1
    
        Page {
          title: "Login"
          AppButton {
            anchors.centerIn: parent
            text: "Show main navigation!"
            onClicked: {
              loginStack.enabled = false
              loginStack.visible = false
              navigation.enabled = true
              navigation.opacity = 1 // solution 2: use opacity instead of visible
            }
          }
        }
      }
    
      Navigation {
        id: navigation
        enabled: false
        opacity: 0 // solution 2: use opacity instead of visible
    
        // ...
      }
    }
    

     

    5) Custom Popups

    We currently do not have a ready-to-use solution for such custom popups. But you can achieve something similar yourself:

    import Felgo 3.0
    import QtQuick 2.5
    
    App {
      id: root
    
      // button
      AppButton {
        id: button
        anchors.centerIn: parent
        text: "Show Popup"
    
        onClicked: {
          // get absolute coordinates for popup
          var popupCoordinates = button.mapToItem(root.contentItem, button.width, 0) // coordinates of top right button corner
          console.log("Popup Coordinates: "+popupCoordinates.x+" - "+popupCoordinates.y)
          root.showPopup(popupCoordinates.x, popupCoordinates.y)
        }
      }
    
      // set up popup component
      Component {
        id: popupComponent
    
        Item {
          id: popupItem
          anchors.fill: parent // will fill whole app screen
          property alias contentItem: rectangle // allows to access popup content
    
          // mouse area covers whole screen for closing the popup
          MouseArea {
            anchors.fill: parent
            onReleased: popupItem.destroy() // destroy popup on mouse/touch release
          }
    
          // the actual custom popup
          Rectangle {
            id: rectangle
            color: "white"
            width: appText.width + 20
            height: appText.height + 20
    
            // allow positioning based on anchors
            anchors.top: parent.top // anchor to screen top
            anchors.right: parent.right // anchor to screen right
    
            AppText {
              id: appText
              anchors.centerIn: parent
              text: "I'm an amazing popup"
            }
          }
        } // item
      } // component
    
      // show popup at specific x, y position
      function showPopup(xPos, yPos) {
        var popup = popupComponent.createObject(root)
    
        // position popup based on anchors
        popup.contentItem.anchors.rightMargin = root.width - xPos
        popup.contentItem.anchors.topMargin = yPos
      }
    }
    

     

    Hope this helps!

    Best,
    Günther

     

     

    • This reply was modified 8 years, 1 month ago by  GT.
    #12849

    Radek

    Yes, thank you for the answers.

Viewing 5 posts - 1 through 5 (of 5 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded