maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   [WIP] Hildon Qt Components (https://talk.maemo.org/showthread.php?t=85955)

marxian 2012-08-08 16:23

[WIP] Hildon Qt Components
 
Recently, I have been working on a set of Hildonized Qt Components for Maemo5. The purpose of this project is to enable easy building of UIs using the Hildon style for those that do not wish to use QtGui/GTK widgets. The project provides a number of QML components along with C++ plugins to provide backend functionality, similar to Harmattan/Symbian Qt Components. The current list of completed components is:
  • BusyIndicator
  • Button
  • ButtonRow
  • CheckBox
  • Contact - Visual component for displaying contacts
  • ContextMenu
  • ContextMenuItem
  • ContextMenuLayout
  • Dialog
  • DialogButton
  • FileBrowserDialog - Fully functional file browser enabling choosing of files/folders and creation of new folders
  • FilterBox - Used with a ListView to filter a list
  • FilterListView - ListView with FilterBox component
  • InfoBanner
  • InfoNote
  • Label
  • ListItem - Base delegate for ListView
  • MaskedItem
  • MenuAction - Menu filter
  • MenuActionGroup - Container for MenuAction
  • MenuItem
  • MenuLayout
  • MultiSelectionDialog - Equivalent to QMaemo5ListPickSelector allowing multiple selections
  • MultiSelectionItem - Convenience component comprising of a SelectionButton and MultiSelectionDialog
  • Page
  • PageStackWindow
  • ProgressBar
  • QueryDialog
  • RatingIndicator
  • ScrollDecorator
  • SearchBox - TextField with some convenience functions for searching/filtering
  • SelectionButton - Equivalent to QMaemo5ValueButton
  • SelectionDialog - Equivalent to QMaemo5ListPickSelector
  • SelectionItem - Convenience component comprising of a SelectionButton and SelectionDialog
  • Slider
  • StylusButton
  • TabBar
  • TabButton
  • TabGroup
  • TextArea
  • TextField
  • ToolBar
  • ToolBarLayout
  • ToolButton
  • WebShortcut - Visual component for displaying web shortcuts

The global properties available are:
  • theme - provides access to theme constants such as fonts and transition values
  • screen - provides access to screen information such as size and orientation

More components will be added to these in future.

Many of these components have associated style components (set via the platformStyle property), which are used to set visual properties. The properties and signals are, where possible, the same as those for the Harmattan components, but I will document them fully once I have them in the repositories. The main difference is in the use of the drop-down menu where Harmattan uses the toolbar. So, for Hildon Qt Components, the tools of a Page component are set like this:

Code:

Page {
    id: root

    tools: MenuLayout {

        MenuItem {
            text: "Menu Item 1"
        }

        MenuItem {
            text: "Menu Item 2"
        }

        MenuItem {
            text: "Menu Item 3"
        }
    }
}

As shown in the screenshots below, components other than the MenuItem can also be used in a menu. These components will be resized accordingly.

Blur transitions are provided for the components, but are disabled by default for performance reasons. The default desaturation is a blurless transition with full color. The blur transitions can be enabled via the global theme property:

Code:

theme.enableDesaturationEffects = true;
More generally, the transition values are taken from the transitions.ini file. The values are loaded at startup and made available via the global theme property. Images are accessed in a similar way to the Harmattan components. To load an image from the current theme:

Code:

Image {
    source: "image://theme/some_image"
}

Or an icon (currently 48x48 icon is used):

Code:

Image {
    source: "image://theme/icon/some_icon"
}

Some screenshots:

http://img209.imageshack.us/img209/3...pshot28.th.png http://img341.imageshack.us/img341/4...pshot31.th.png http://img836.imageshack.us/img836/1...pshot32.th.png
http://img515.imageshack.us/img515/2...pshot33.th.png http://img198.imageshack.us/img198/3...shot34c.th.png http://img152.imageshack.us/img152/4...pshot36.th.png
http://img98.imageshack.us/img98/574...shot39a.th.png http://img685.imageshack.us/img685/6...pshot41.th.png http://img193.imageshack.us/img193/9...pshot43.th.png
http://img689.imageshack.us/img689/6...pshot44.th.png http://img441.imageshack.us/img441/2...shot46c.th.png http://img441.imageshack.us/img441/9...shot49a.th.png
http://img443.imageshack.us/img443/1...pshot29.th.png http://img837.imageshack.us/img837/4...pshot35.th.png http://img826.imageshack.us/img826/5...shot42a.th.png http://img580.imageshack.us/img580/5...shot45u.th.png

Latest source is at https://github.com/marx1an/qt-components-hildon

qwazix 2012-08-08 16:54

Re: [WIP] Hildon Qt Components
 
Wow! I've been thinking to start doing something like that, I even started something but I never found the time to continue. Awesome work. I must find something to start coding with them.

ivgalvez 2012-08-08 18:26

Re: [WIP] Hildon Qt Components
 
How is this related with QtComponents for Fremantle?

marxian 2012-08-08 18:45

Re: [WIP] Hildon Qt Components
 
Quote:

Originally Posted by ivgalvez (Post 1249224)
How is this related with qtComponents for Fremantle?

It isn't related to that project, because the goals are different. QtComponents for Fremantle is about enabling applications written using Harmattan QtComponents to run unaltered on Fremantle using Harmattan UX. Hildon QtComponents is about enabling developers to create applications with Hildon UX using QML. The component names and properties are kept as similar to Harmattan QtComponents as possible for familiarity, but there is very little code shared between the two projects (only the PageStack component, I think). Hildon QtComponents does not depend on QtComponents for Fremantle.

munozferna 2012-08-08 19:52

Re: [WIP] Hildon Qt Components
 
Fantastic work! is there any place to check your work? please make it available on the extras (extras-devel) repo, that way it can be easily added as a dependency for new QML applications for Fremantle

marxian 2012-08-09 00:13

Re: [WIP] Hildon Qt Components
 
Quote:

Originally Posted by munozferna (Post 1249246)
Fantastic work! is there any place to check your work? please make it available on the extras (extras-devel) repo, that way it can be easily added as a dependency for new QML applications for Fremantle

I'll be uploading to extras-devel as soon as I've sorted out the packaging and installation details. :)

freemangordon 2012-08-09 19:18

Re: [WIP] Hildon Qt Components
 
Great job pal.

Does it need Qt from CSSU?

EDIT:

Hmm, I realize my question sounds silly in the light of your statement that you'll upload that to extras-devel :)

jackburton 2012-08-09 20:56

Re: [WIP] Hildon Qt Components
 
long live the N900

marxian 2012-08-10 09:03

Re: [WIP] Hildon Qt Components
 
Quote:

Originally Posted by freemangordon (Post 1249744)
Great job pal.

Does it need Qt from CSSU?

EDIT:

Hmm, I realize my question sounds silly in the light of your statement that you'll upload that to extras-devel :)

I don't believe it will require Qt 4.7.4, unless I use QSystemInfo for the battery indicator etc. Presumably there are lower-level methods to get battery info and such that would enable me to avoid using the high-level QtMobility APIs.

EDIT: Also, I don't suppose you know the answer to my question of how to determine which theme is currently being used? I need to be able to tell my QDeclarativeImageProvider where to load the images from (and also load transistions.ini if the theme overrides the default one).

nicolai 2012-08-10 09:45

Re: [WIP] Hildon Qt Components
 
Quote:

Originally Posted by marxian (Post 1249997)
how to determine which theme is currently being used?

/etc/hildon/theme

nicolai

freemangordon 2012-08-11 07:37

Re: [WIP] Hildon Qt Components
 
Quote:

Originally Posted by marxian (Post 1249997)
I don't believe it will require Qt 4.7.4, unless I use QSystemInfo for the battery indicator etc. Presumably there are lower-level methods to get battery info and such that would enable me to avoid using the high-level QtMobility APIs.

EDIT: Also, I don't suppose you know the answer to my question of how to determine which theme is currently being used? I need to be able to tell my QDeclarativeImageProvider where to load the images from (and also load transistions.ini if the theme overrides the default one).

Well, there is a little "hack" in CSSU Qt, which allows applications to use GTK syles, without taking care what is the current theme, you may want to look at it:

http://gitorious.org/community-ssu/q...f9c83f6668f4f9

this is an example of how it is used:
http://gitorious.org/community-ssu/o...ton.cpp#line46

That way Qt uses whatever sapwood has decided to be current, theme changes are applied on-the-fly, you don't need to care where the current theme images are stored and what their names are, etc. And of course memory usage is reduced, as Qt does not load its owns set of images, but uses shared pixmaps (the same ones GTK uses)

NFC if the above helps you, I am not much into QML, but for native QPushButton that works with no problems (check how osso-calculator in CSSU behaves when theme is changed). So you may want to create your own set of native GTK widgets (in the same way Qt does) and trick somehow GTK to give you the pixmaps so you can GL draw them (I suspect QML uses QGLWidget/QGraphicsWidget/QGraphicsScene).

Though I may had written nonsense as well :D


EDIT:
Why do you need to know the current transitions.ini?

marxian 2012-08-11 14:15

Re: [WIP] Hildon Qt Components
 
Quote:

Originally Posted by freemangordon (Post 1250323)
Well, there is a little "hack" in CSSU Qt, which allows applications to use GTK syles, without taking care what is the current theme, you may want to look at it:

http://gitorious.org/community-ssu/q...f9c83f6668f4f9

this is an example of how it is used:
http://gitorious.org/community-ssu/o...ton.cpp#line46

That way Qt uses whatever sapwood has decided to be current, theme changes are applied on-the-fly, you don't need to care where the current theme images are stored and what their names are, etc. And of course memory usage is reduced, as Qt does not load its owns set of images, but uses shared pixmaps (the same ones GTK uses)

NFC if the above helps you, I am not much into QML, but for native QPushButton that works with no problems (check how osso-calculator in CSSU behaves when theme is changed). So you may want to create your own set of native GTK widgets (in the same way Qt does) and trick somehow GTK to give you the pixmaps so you can GL draw them (I suspect QML uses QGLWidget/QGraphicsWidget/QGraphicsScene).

Though I may had written nonsense as well :D


EDIT:
Why do you need to know the current transitions.ini?

I already have my QDeclarativeImageProvider set up, but I'll at least consider the method you propose. For now, the fact that /etc/hildon/theme points to the directory of the current theme is enough.

As I understand it, some themes supply their own transitions.ini. I want to load this (if applicable) to provide correct values for pop-in/out durations etc. The idea is that these components will behave just as any GTK/QtGui application would.

I have all the above working now, but for some reason I have an undefined symbol error when trying to import the plugin. AFAICT, my approach to exporting the plugin library is exactly the as that used by the MeeGo/Symbian components plugin.

qwazix 2013-01-15 22:31

Re: [WIP] Hildon Qt Components
 
Is this already in extras-devel or otherwise available for use?

marxian 2013-01-15 23:10

Re: [WIP] Hildon Qt Components
 
Quote:

Originally Posted by qwazix (Post 1315288)
Is this already in extras-devel or otherwise available for use?

Not yet. Most of the components are fully working, but there is a performance issue with popup components (menus, dialogs etc). Should be easy to fix, but I haven't had time to resume work on this yet.

I'm considering re-writing the components using C++, and basing them on C++ QDeclarativeItem instead of the QML Item element. This should allow me to use the GTK pixmaps, as per freemangordon's suggestion. It will also have other benefits. QML is great for quickly building a UI with existing components, but writing complex components using QML and JS is messy (just look at some of the Nokia Qt Components).

qwazix 2013-01-16 07:34

Re: [WIP] Hildon Qt Components
 
If it's not too much to ask, can I have them even in the current state? I'd like to start doing an UI for the fremantle port of ipcLite. Whenever you update, if API breaks, I'll be happy to update my code.

marxian 2013-01-16 13:22

Re: [WIP] Hildon Qt Components
 
1 Attachment(s)
Quote:

Originally Posted by qwazix (Post 1315358)
If it's not too much to ask, can I have them even in the current state? I'd like to start doing an UI for the fremantle port of ipcLite. Whenever you update, if API breaks, I'll be happy to update my code.

I've attached a tarball containing the source. I don't expect the existing API to change. There will be additions (currently there is no edit bar, tree view etc), but the names, properties and signals of the current set of components should remain the same.

qwazix 2013-01-19 14:32

Re: [WIP] Hildon Qt Components
 
Marxian, thanks for the source, I managed to build it, but QDeclarativeFolderListModel is missing. I copied the one from qt examples but it lacks some methods such as setRoot()

For now I can work as I commented out the calls to those methods but please share this file as well.

Thanks again.

(Now I have to set up my thimb toolchain :) )

marxian 2013-01-19 16:33

Re: [WIP] Hildon Qt Components
 
1 Attachment(s)
Quote:

Originally Posted by qwazix (Post 1315888)
Marxian, thanks for the source, I managed to build it, but QDeclarativeFolderListModel is missing. I copied the one from qt examples but it lacks some methods such as setRoot()

For now I can work as I commented out the calls to those methods but please share this file as well.

Thanks again.

(Now I have to set up my thimb toolchain :) )

The files have been deleted. :( I have recreated QDeclarativeFolderListModel and made some changes. Replace filesystemmodel.* with the new files.

Are you able to import org.hildon.components successfully after installation? I was getting an undefined symbol error in the plugin, and wasn't able to figure out the cause.

qwazix 2013-01-19 18:26

Re: [WIP] Hildon Qt Components
 
No, I get that undefined symbol error too but I thought it should be the fact that I compiled with different qt (madde, 4.6.3) than that on the device (4.7.4).

However, as with the repos down it's impossible for now to set up a working thumb scratchbox target, I compiled it with desktop Qt for the simulator, and installed them in the simulator. However I'm getting the same error when importing. This new finding, and the fact that this happens to you too probably invalidates the above assumption.

I'll try to find what causes that undefined symbol.

freemangordon 2013-01-19 18:37

Re: [WIP] Hildon Qt Components
 
Quote:

Originally Posted by qwazix (Post 1315947)
No, I get that undefined symbol error too but I thought it should be the fact that I compiled with different qt (madde, 4.6.3) than that on the device (4.7.4).

However, as with the repos down it's impossible for now to set up a working thumb scratchbox target, I compiled it with desktop Qt for the simulator, and installed them in the simulator. However I'm getting the same error when importing. This new finding, and the fact that this happens to you too probably invalidates the above assumption.

I'll try to find what causes that undefined symbol.

what symbol is undefined?

qwazix 2013-01-20 01:01

Re: [WIP] Hildon Qt Components
 
Code:

(/opt/QtSDK/Simulator/Qt/gcc/imports/org/hildon/components/libhildonplugin.so: undefined symbol: _ZTV12HildonPlugin)
The same appears on device too.

EDIT:

It worked :)

I just needed to move the declaration of the plugin class to a header file instead of a source file.

marxian 2013-01-20 15:26

Re: [WIP] Hildon Qt Components
 
Quote:

Originally Posted by qwazix (Post 1316001)
Code:

(/opt/QtSDK/Simulator/Qt/gcc/imports/org/hildon/components/libhildonplugin.so: undefined symbol: _ZTV12HildonPlugin)
The same appears on device too.

EDIT:

It worked :)

I just needed to move the declaration of the plugin class to a header file instead of a source file.

Thanks. Now that that obstacle is overcome, I'll get back to working on this.

EditBar now added:

http://t.imgbox.com/adeUEtNa.jpg

Code:

EditBar {
    titleText: qsTr("Select items to edit")

    EditButton {
        text: qsTr("Edit")
        onClicked: doStuff()
    }
}


marxian 2013-01-20 20:44

Re: [WIP] Hildon Qt Components
 
Some more changes. FileSystemModel is fixed and FileBrowserDialog is changed to conform to Hildon style.

http://t.imgbox.com/acrmPesa.jpg

http://t.imgbox.com/adz9r3qJ.jpg

Latest source: https://github.com/marx1an/qt-components-hildon

qwazix 2013-01-20 22:55

Re: [WIP] Hildon Qt Components
 
Thanks for the awesome work. Here is the first implementation using your components http://youtu.be/hVAtWl3oUHI

Source here https://github.com/qwazix/qmlBrowser

I also uploaded qt-components to github, if you got an account we can collaborate there: https://github.com/qwazix/hildon-qt-components

EDIT: stupid. I didn't see you already pushed there. I'll merge.

Finally some thoughts...
  1. Minimizing the application with screen.minimize() didn't work for me, I had to resort to using dbus 'exit-app-view'
  2. PageStackWindow crashes on device with
    Code:

    X Error: BadMatch (invalid parameter attributes) 8
      Major opcode: 42 (X_SetInputFocus)
     Resource id:  0x6200002

  3. We need all the icons in the status area, maybe using the pixmap from gtk as freemangordon suggested is the way to go. Other ideas?
  4. Or is it possible to use the system status bar and have qt menus bound into qml or some other such contraption? I know qml is supposed to be fullscreen and implement everything from scratch, but getting the icons might be harder than this.
  5. Maybe the Status Bar could be exposed so that it can be used in more creative ways. In my implementation I copied the code and modified it so that it can be used standalone, outside a pageStack, you may want to have a look at it

EDIT2: also selecting text in textfields doesn't work

marxian 2013-01-20 23:42

Re: [WIP] Hildon Qt Components
 
Quote:

Originally Posted by qwazix (Post 1316204)

Finally some thoughts...
  1. Minimizing the application with screen.minimize() didn't work for me, I had to resort to using dbus 'exit-app-view'
  2. PageStackWindow crashes on device with
    Code:

    X Error: BadMatch (invalid parameter attributes) 8
      Major opcode: 42 (X_SetInputFocus)
     Resource id:  0x6200002

  3. We need all the icons in the status area, maybe using the pixmap from gtk as freemangordon suggested is the way to go. Other ideas?
  4. Or is it possible to use the system status bar and have qt menus bound into qml or some other such contraption? I know qml is supposed to be fullscreen and implement everything from scratch, but getting the icons might be harder than this.
  5. Maybe the Status Bar could be exposed so that it can be used in more creative ways. In my implementation I copied the code and modified it so that it can be used standalone, outside a pageStack, you may want to have a look at it

Minimizing is done via the platformWindow context. I moved it from HildonScreenPlugin (which now just provides the screen dimensions and orientation) to HildonWindowPlugin. It seems I forgot to change the method call in MinimizeButton.qml. I've corrected it now.

I haven't tested on-device for a while, so I'm not sure about the crashing. It worked last time I tested, but there have been some code changes since then.

I think using the GTK pixmaps requires creating a widget instance. Whilst it is possible to render QWidgets in a QGraphicsScene, it's not recommended (according to the documentation), so it may be better to avoid that solution.

As far as the statusbar info is concerned, this can be obtained using QSystemInfo (HildonSystemPlugin currently uses it for battery, profile and network status), but I've had problems with this in Qt4.7.0, so lower-level alternatives may need to be considered. The icons are missing because I haven't finished the implementation on the QML side. The main thing missing from the status bar is the ability to raise the Hildon status menu. I wonder if a DBus method can be added to hildon-status-menu. :)

I couldn't see any difference in your StatusBar.qml. What use case do you have in mind?

EDIT: Text selection via mouse drag is now fixed. Just needed to set selectByMouse to true. :)

qwazix 2013-01-22 23:14

Re: [WIP] Hildon Qt Components
 
Sorry, I wasn't clear enough. I was talking about this https://github.com/qwazix/qmlBrowser...omTitleBar.qml

marxian 2013-01-23 18:53

Re: [WIP] Hildon Qt Components
 
StatusBar, Menu, and PageStack are now independent components, so they can be used outside of PageStackWindow. There is also a new ApplicationWindow component.

Code:

ApplicationWindow {
    id: appWindow

    StatusBar {
        id: statusBar

        property string backPressedState: backButtonPressed ? "Pressed" : ""

        anchors {
            top: parent.top
            left: parent.left
            right: parent.right
        }

        titleText: pageStack.currentPage === null ? "" : pageStack.currentPage.title
        showMenuIndicator: (pageStack.currentPage !== null) && (pageStack.currentPage.tools !== null)
        backButtonIconSource: (pageStack === null) || (pageStack.depth === 1) ? "image://theme/wmCloseIcon" + backPressedState : "image://theme/wmBackIcon" + backPressedState
        onTitleAreaClicked: menu.open()
        onBackClicked: (pageStack === null) || (pageStack.depth === 1) ? Qt.quit() : pageStack.pop()
        onBackPressAndHold: if ((pageStack !== null) && (pageStack.depth > 1)) pageStack.pop(null);
    }

    PageStack {
        id: pageStack

        anchors {
            top: statusBar.bottom
            left: parent.left
            right: parent.right
            bottom: parent.bottom
        }

        Component.onCompleted: push(Qt.resolvedUrl("HomePage.qml"), null, true)
    }

    Menu {
        id: menu

        tools: pageStack.currentPage === null ? null : pageStack.currentPage.tools
    }
}


marxian 2013-01-24 14:55

Re: [WIP] Hildon Qt Components
 
I've now added a QDeclarativeProcess plugin. This makes the the QProcess API accessible via QML. It doesn't depend on qt-components-hildon, so if you have a QML project and want to use QProcess, feel free to use my code.

Example:

Code:

import QtQuick 1.0
import org.hildon.components 1.0

Page {
    id: root

    title: qsTr("Process page")

    Process {
        id: process

        processEnvironment: { "PATH": "/usr/bin:/usr/local/bin", "USER": "stuart" }
        workingDirectory: "/home/stuart/Development/QtProjects"
        onError: resultLabel.text = "<font color='red'>" + qsTr("Error") + "</font>"
        onFinished: resultLabel.text = process.readAllStandardOutput()
    }

    Column {
        id: column

        spacing: 10

        anchors {
            left: parent.left
            right: parent.right
            top: parent.top
            margins: platformStyle.paddingNormal
        }

        Label {
            text: qsTr("Working directory") + ": " + process.workingDirectory
        }

        Label {
            text: "PATH: " + process.processEnvironment.PATH + ", USER: " + process.processEnvironment.USER
        }

        Label {
            text: qsTr("Command") + ":"
        }

        Row {
            spacing: platformStyle.paddingNormal

            TextField {
                id: commandEdit

                width: 300
                text: "echo hello world"
                onTextChanged: process.command = text
            }

            Button {
                id: startButton

                text: qsTr("Start")
                enabled: process.state === Processes.NotRunning
                onClicked: process.start()
            }

            Button {
                id: stopButton

                text: qsTr("Cancel")
                enabled: process.state === Processes.Running
                onClicked: process.terminate()
            }

        }

        Label {
            text: qsTr("Result") + ":"
        }
    }

    Flickable {
        id: flicker

        anchors {
            top: column.bottom
            left: parent.left
            right: parent.right
            bottom: parent.bottom
            margins: platformStyle.paddingNormal
        }
        clip: true
        contentHeight: resultLabel.height + platformStyle.paddingNormal

        Label {
            id: resultLabel

            width: parent.width
            wrapMode: Text.WordWrap
            color: "green"
        }
    }

    ScrollDecorator {
        flickableItem: flicker
    }
}

http://t.imgbox.com/adxeQDDy.jpg

marxian 2013-01-25 21:27

Re: [WIP] Hildon Qt Components
 
I've added a Qt Components Hildon Gallery to demonstrate the currently available components. :)

http://t.imgbox.com/acmK9TyU.jpg http://t.imgbox.com/adrDa5T1.jpg http://t.imgbox.com/acjusXo4.jpg http://t.imgbox.com/abwOapI3.jpg http://t.imgbox.com/acoK4TqR.jpg http://t.imgbox.com/advnOyss.jpg http://t.imgbox.com/adsC5TC6.jpg

https://github.com/marx1an/qt-compon...master/gallery

I'll add a couple of small example applications soon.

freemangordon 2013-01-25 22:23

Re: [WIP] Hildon Qt Components
 
Impressive work :)

marxian 2013-01-28 00:23

Re: [WIP] Hildon Qt Components
 
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:

http://img547.imageshack.us/img547/7...shot18y.th.png http://img15.imageshack.us/img15/566...shot19k.th.png http://img818.imageshack.us/img818/4...shot20b.th.png

http://img26.imageshack.us/img26/435...hot21sx.th.png http://img708.imageshack.us/img708/4...shot22i.th.png http://img856.imageshack.us/img856/3...shot23b.th.png

http://img849.imageshack.us/img849/9...shot24j.th.png http://img707.imageshack.us/img707/8...hot25yc.th.png http://img203.imageshack.us/img203/1...shot26h.th.png

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

Pretty basic atm, but I'll add some more features later.

qwazix 2013-02-10 14:03

Re: [WIP] Hildon Qt Components
 
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"}
        }
    }


marxian 2013-02-11 14:56

Re: [WIP] Hildon Qt Components
 
Quote:

Originally Posted by qwazix (Post 1322252)
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"}
        }
    }


nodevel 2013-03-11 08:52

Re: [WIP] Hildon Qt Components
 
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.

shentey 2013-03-17 00:42

Re: [WIP] Hildon Qt Components
 
Quote:

Originally Posted by nodevel (Post 1328307)
Could anyone please add a short how-to on the compilation?

You need to install qtmobility first before you can compile Hildon Qt Components.

nodevel 2013-03-17 12:30

Re: [WIP] Hildon Qt Components
 
Quote:

Originally Posted by shentey (Post 1329507)
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


shentey 2013-03-17 19:27

Re: [WIP] Hildon Qt Components
 
Quote:

Originally Posted by nodevel (Post 1329587)
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

shentey 2013-03-17 19:35

Re: [WIP] Hildon Qt Components
 
Quote:

Originally Posted by nodevel (Post 1329587)
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.

disappear 2013-04-17 06:41

Re: [WIP] Hildon Qt Components
 
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

sixwheeledbeast 2013-08-22 20:13

Re: [WIP] Hildon Qt Components
 
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?


All times are GMT. The time now is 07:49.

vBulletin® Version 3.8.8