Reply
Thread Tools
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#31
Some more changes:
  • QDeclarativeSettingsPlugin making QSettings API accessible via QML.
  • platformWindow context now has a takeScreenShot() method, which uses the static QPixmap::grabWidget() method to take a screenshot and save it to the specified filename.

Example:

Code:
Page {
    id: root

    Settings {
        id: settings

        organizationName: "Me"
        applicationName: "MyApplication"
    }

    Button {
        id: button
       
        anchors.centerIn: parent
        text: "Screenshot"
        onClicked: platformWindow.takeScreenShot(settings.value("screenShotFolder", "/home/user/MyDocs/Images/") + "screenshot.png") // x, y, width, height, scaledWidth and scaledHeight can also be specified.
    }
}
First example application is a web browser with support for tabbed browsing and bookmarks:







https://github.com/marx1an/qt-compon...amples/browser

Pretty basic atm, but I'll add some more features later.
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub

Last edited by marxian; 2013-01-28 at 00:26. Reason: s/organisation/organization
 

The Following 3 Users Say Thank You to marxian For This Useful Post:
qwazix's Avatar
Moderator | Posts: 2,622 | Thanked: 5,447 times | Joined on Jan 2010
#32
When referencing the Menu directly (and not as part of pageStackWindow), I get the following error. I tried to dig down to the PopUp element but it doesn't seem to inherit or otherwise use dialog.

Code:
ReferenceError: Can't find variable: DialogStatus
                        ScriptAction { script: root.status = DialogStatus.Open }
what can I do to get over that?

Menu implementation as follows
Code:
    Menu{
        id: menu
        MenuLayout{
            Button{ text: "adasd"}
        }
    }
__________________
Proud coding competition 2012 winner: ρcam
My other apps: speedcrunch N9 N900 Jolla –– contactlaunch –– timenow

Nemo UX blog: Grog
My website: qwazix.com
My job: oob
 
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#33
Originally Posted by qwazix View Post
When referencing the Menu directly (and not as part of pageStackWindow), I get the following error. I tried to dig down to the PopUp element but it doesn't seem to inherit or otherwise use dialog.

Code:
ReferenceError: Can't find variable: DialogStatus
                        ScriptAction { script: root.status = DialogStatus.Open }
what can I do to get over that?

Menu implementation as follows
Code:
    Menu{
        id: menu
        MenuLayout{
            Button{ text: "adasd"}
        }
    }
The MenuLayout should be assigned to the tools property of the Menu:

Code:
    Menu{
        id: menu
        tools: MenuLayout{
            Button{ text: "adasd"}
        }
    }
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub
 
Posts: 752 | Thanked: 2,808 times | Joined on Jan 2011 @ Czech Republic
#34
Great job. Could anyone please add a short how-to on the compilation?

I have tried standard qmake && make, but it complains about 'QSystemDeviceInfo' missing.
The reason might be I try to compile it on my Desktop instead of N900, but since my Desktop is my primary development environment, it is much needed. Thank you.

Last edited by nodevel; 2013-03-11 at 09:23.
 

The Following User Says Thank You to nodevel For This Useful Post:
Posts: 11 | Thanked: 69 times | Joined on Mar 2013
#35
Originally Posted by nodevel View Post
Could anyone please add a short how-to on the compilation?
You need to install qtmobility first before you can compile Hildon Qt Components.
 

The Following User Says Thank You to shentey For This Useful Post:
Posts: 752 | Thanked: 2,808 times | Joined on Jan 2011 @ Czech Republic
#36
Originally Posted by shentey View Post
You need to install qtmobility first before you can compile Hildon Qt Components.
Thank you, that was it - therefore I made a Chakra CCR package here: http://chakra-linux.org/ccr/packages.php?ID=5170 (for anyone interested).

I am just not sure about the licensing...

EDIT: It builds fine, but fails to run with:
Code:
plugin cannot be loaded for module "org.hildon.components": Cannot load library /usr/lib/qt/imports/org/hildon/components/libhildonplugin.so: (/usr/lib/qt/imports/org/hildon/components/libhildonplugin.so: undefined symbol: _ZNK20QDeclarativeSettings10metaObjectEv) 
     import org.hildon.components 0.1

Last edited by nodevel; 2013-03-17 at 14:46.
 
Posts: 11 | Thanked: 69 times | Joined on Mar 2013
#37
Originally Posted by nodevel View Post
EDIT: It builds fine, but fails to run with:
Code:
plugin cannot be loaded for module "org.hildon.components": Cannot load library /usr/lib/qt/imports/org/hildon/components/libhildonplugin.so: (/usr/lib/qt/imports/org/hildon/components/libhildonplugin.so: undefined symbol: _ZNK20QDeclarativeSettings10metaObjectEv) 
     import org.hildon.components 0.1
Yep, I've experienced that runtime error as well. I've created a pull request for it: https://github.com/marx1an/qt-components-hildon/pull/1
 
Posts: 11 | Thanked: 69 times | Joined on Mar 2013
#38
Originally Posted by nodevel View Post
EDIT: It builds fine, but fails to run with:
Code:
plugin cannot be loaded for module "org.hildon.components": Cannot load library /usr/lib/qt/imports/org/hildon/components/libhildonplugin.so: (/usr/lib/qt/imports/org/hildon/components/libhildonplugin.so: undefined symbol: _ZNK20QDeclarativeSettings10metaObjectEv) 
     import org.hildon.components 0.1
Yep, I've experienced that runtime error as well. I've created a pull request for it: https://github.com/marx1an/qt-components-hildon/pull/1

Note that you'll have to do some further adoptions of the code to load the images from the right places in the desktop version. Moreover, you also need to install the Hildon icons and theme images somewhere in the system, otherwise you'll get complaints at runtime that these can't be found.
 
Posts: 238 | Thanked: 131 times | Joined on May 2011 @ Bulgaria
#39
Hi Marxian,thanks for these tools,but have you any plans to put your work in repo,I asked because for me is very hard to understand how to run hildon qt-components on my n900
regards
 

The Following User Says Thank You to disappear For This Useful Post:
Posts: 2,290 | Thanked: 4,133 times | Joined on Apr 2010 @ UK
#40
I don't know if this is related to hildon-components or the browser itself but I have noticed QML-browser doesn't use system fonts for most of it's text.

Also from some testing it seems to ignore some html meta tags that provide mobile skins of websites, opting to only show the desktop version.

Is there plan for further work on QML-browser?
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 
Reply

Tags
hildon, qml components

Thread Tools

 
Forum Jump


All times are GMT. The time now is 12:46.