Re: [Interest] MenuBar QML not usable on Yosemite OSX

2015-04-15 Thread Daiwei Li
"Mockup" > > > menuBar: MenuBar > > { > > id: mainmenu > > Menu > > { > > title: qsTr("Mockup") > > MenuItem > > { > > text: qsTr("Exit") > >

Re: [Interest] QML detecting swipe gesture for open side menu

2015-04-14 Thread Daiwei Li
Here's an example of a NavigationDrawer implementation in QML that I found online: https://gist.github.com/jbache/2b625d40efd4c344ab20 On Tue, Apr 14, 2015 at 9:26 AM, Gianluca wrote: > Hello, > I’m trying to achieve something very common on the mobile app: the swipe > from left to right made fr

Re: [Interest] MenuBar QML not usable on Yosemite OSX

2015-04-14 Thread Daiwei Li
You have to use an ApplicationWindow as your top-level item and assign your MenuBar to the menuBar property of it: http://doc.qt.io/qt-5/qml-qtquick-controls-applicationwindow.html#menuBar-prop On Tue, Apr 14, 2015 at 10:05 AM, mark diener wrote: > Hello: > > Tried using a MenuBar QML component

Re: [Interest] High-dpi fixing for Qt 5.5

2015-03-20 Thread Daiwei Li
Hi Morten, Do you know if auto-detection of scale factor on Windows is going to be tackled again: https://codereview.qt-project.org/#/c/87716/? There's no specific bug open for it besides being mentioned on the Windows High DPI meta-bug: https://bugreports.qt.io/browse/QTBUG-38993, but perhaps th

Re: [Interest] Qt Quick Compiler 2.0

2015-01-18 Thread Daiwei Li
Hi Nuno, I've experienced crashing with the android_armv7 qtquickcompiler on OSX. After some digging, I found that it was due to the generated .cpp being incorrect for certain JS literals and expressions (see http://pastebin.com/raw.php?i=KaT2aB72 for more examples). This trivial example: functio

[Interest] Qt for NaCl port

2014-05-08 Thread Daiwei Li
Hello, I'm investigating porting an existing C++/QML application to Google NaCl, and I found that Qt had attempted a port a couple years ago: http://qt-project.org/wiki/Qt_for_Google_Native_Client. From what I've found online, it looks like it's unsupported and no longer works with the latest Qt a

Re: [Interest] qt-android: How to make QML application scaled on high DPI screen automatically

2014-03-03 Thread Daiwei Li
Hi Yang and all, I'm curious about how to scale for high DPI on Android as well, so I did some reading of the Qt source today. On iOS and OSX, scaling is handled by implementing devicePixelRatio() in the respective QPlatformWindow implementations. On Android, the equivalent concept seems to be "d

[Interest] Qt 5.2 QML Startup Time

2014-01-30 Thread Daiwei Li
Hello, I'm looking into upgrading my QML/C++ app (about ~150-200 QML files) from Qt 5.1 to Qt 5.2 and have noticed a large increase in startup time. I measured the time it took from QQmlApplicationEngine::load to the objectCreated signal being fired for the window and I'm seeing about 1 second on

Re: [Interest] QML Action source

2013-09-14 Thread Daiwei Li
11, 2013, at 1:45 AM, Daiwei Li wrote: > > > I'm investigating adding analytics to my QML application and would like > to differentiate between reasons why an action is triggered, e.g. from a > MenuItem vs keyboard shortcut vs Button press. Looking at qquickaction.cpp, >

[Interest] QML Action source

2013-09-10 Thread Daiwei Li
Hello, I'm investigating adding analytics to my QML application and would like to differentiate between reasons why an action is triggered, e.g. from a MenuItem vs keyboard shortcut vs Button press. Looking at qquickaction.cpp, this information does not seem to be made available. What would be th

[Interest] QML: Optional Menus in MenuBar

2013-08-08 Thread Daiwei Li
Hi all, I would like to be able to include Menus in my ApplcationWindow's MenuBar based on the platform. e.g.: import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Window 2.0 ApplicationWindow { title: qsTr("Hello World") width: 640 height: 480 menuBar: MenuBa

[Interest] QML: Changing focus when clicking outside a focused Item

2013-07-12 Thread Daiwei Li
Hi everyone, I'm wondering if there is a recommended way to relinquish focus from an Item (or rather, give focus to a pre-determined item) if you click outside of it. Consider the following example: import QtQuick 2.0 Item { id: root width: 600 height: 300 Rectangle {

Re: [Interest] QtQuickControls Layout Question

2013-06-08 Thread Daiwei Li
en I have the Text inside of it? Thanks, Daiwei On Sat, Jun 8, 2013 at 12:17 AM, Bache-Wiig Jens wrote: > > On Jun 7, 2013, at 11:55 PM, Daiwei Li wrote: > > > Hello all, > > > > I'm having some trouble understanding what happens with the following > QML: > &

[Interest] QtQuickControls Layout Question

2013-06-07 Thread Daiwei Li
Hello all, I'm having some trouble understanding what happens with the following QML: import QtQuick 2.1 import QtQuick.Layouts 1.0 Item { width: 320 height: 240 ColumnLayout { anchors.left: parent.left anchors.right: parent.right RowLayout {

Re: [Interest] QML Window handling focus events

2013-05-20 Thread Daiwei Li
Thanks for the quick response, Alan! appliaction.active works for me for now, but I'm looking forward to onActiveChanged being added to Qt 5.1. Daiwei On Mon, May 20, 2013 at 6:57 PM, Alan Alpert <4163654...@gmail.com> wrote: > On Mon, May 20, 2013 at 5:56 PM, Daiwei Li wrote

[Interest] QML Window handling focus events

2013-05-20 Thread Daiwei Li
It looks the QQuickWindow C++ class has focusIn and focusOut event handlersthat you can override, but there's no signal in QML. Am I missing something or is it intentionally left out of QML? Thanks, Daiwei __