![]() |
2012-07-03
, 18:15
|
Posts: 3,328 |
Thanked: 4,476 times |
Joined on May 2011
@ Poland
|
#12
|
![]() |
2012-07-03
, 18:36
|
Posts: 1,313 |
Thanked: 2,978 times |
Joined on Jun 2011
@ Finland
|
#13
|
Is there any way I can tell the Rectangle to occupy the maximum size (as it's with Column only), so that in landscape N900 it'll be 800x480, portrait N900 480x800, portrait N9 480x854 and so on?
The Following User Says Thank You to ajalkane For This Useful Post: | ||
![]() |
2012-07-03
, 19:23
|
Posts: 3,328 |
Thanked: 4,476 times |
Joined on May 2011
@ Poland
|
#14
|
I don't know about N900, but for N9 see the QML Window component's sources on how to do it. Here's its documentation:
http://harmattan-dev.nokia.com/docs/...go-window.html
import QtQuick 1.0 import org.maemo.fremantle 1.0 //property color fontcolor: "white" PageStackWindow { property color fontcolor: "white" initialPage: Component { Column { Row { width: parent.width CheckBox { id: tracksrc //text: "Select track from library" checked: true //checkable: true } Label { id: tracksrcText text: "Select track from library" anchors.verticalCenter: tracksrc.verticalCenter color: fontcolor } } Label { id: selecttracklabel text: "Selected track" color: fontcolor } Button { id: selecttrack text: "No track selected" checkable: false width: parent.width onClicked: { } } SelectionDialog { id: lyricssrcdialog titleText: "Download source" selectedIndex: 0 model: ListModel { ListElement { name: "AZLyrics" } } } Button { id: lyricssrcbutton text: lyricssrcdialog.model.get(lyricssrcdialog.selectedIndex).name width: parent.width onClicked: { lyricssrcdialog.open(); } } Button { id: go text: "Go!" width: parent.width } } } }
![]() |
2012-07-03
, 20:32
|
Posts: 1,313 |
Thanked: 2,978 times |
Joined on Jun 2011
@ Finland
|
#15
|
I think it's what I'm looking for, as I plan to release my programs not only for N900 but for N9 too.
But somehow the hildon status menu is still shown. changing showExpanded() to showMaximized() doesn't work.
PageStackWindow { showStatusBar: false ... }
The Following User Says Thank You to ajalkane For This Useful Post: | ||
![]() |
2012-07-04
, 08:55
|
Posts: 3,328 |
Thanked: 4,476 times |
Joined on May 2011
@ Poland
|
#16
|
I'm not familiar with Fremantle, but on Harmattan PageStackWindow's showStatusBar property should do the trick:
In C++ showFullScreen() should be called.Code:PageStackWindow { showStatusBar: false ... }
width: parent.width
screen.width
![]() |
2012-07-04
, 13:48
|
Posts: 3,328 |
Thanked: 4,476 times |
Joined on May 2011
@ Poland
|
#17
|
OK. I'm starting to work it out. showStatusBar should be true, and only showFullScreen() in C++.
Is there any way I set the width of the buttons to be resized as the screen rotates? With Column only I set
But with PageStackWindow the width is set well only after clicking the button pointing to the SelectionDialog. AndCode:width: parent.width
is always 800 even after rotation (then it should be 480)Code:screen.width
property int screenwidth: (screen.currentOrientation == Screen.Landscape) ? screen.displayWidth : screen.displayHeight
Can't find variable: mainView
import "." import "mainView.qml" import "mainView.qml" as mainView
![]() |
2012-07-04
, 13:59
|
|
Posts: 1,637 |
Thanked: 4,424 times |
Joined on Apr 2009
@ Germany
|
#18
|
The Following User Says Thank You to nicolai For This Useful Post: | ||
![]() |
2012-07-04
, 20:41
|
Posts: 1,313 |
Thanked: 2,978 times |
Joined on Jun 2011
@ Finland
|
#19
|
But I've got another problem. I want to divide the program into multiple files but
Files are:
main.qml - the main one, only PageStackWindow
mainView.qml - Page used by main.qml
And I'm getting
I tried importingCode:Can't find variable: mainView
But nothing works.Code:import "." import "mainView.qml" import "mainView.qml" as mainView
thanx in advance
PageStackWindow { ... MainView { ... } }
The Following User Says Thank You to ajalkane For This Useful Post: | ||
![]() |
2012-07-05
, 09:34
|
Posts: 3,328 |
Thanked: 4,476 times |
Joined on May 2011
@ Poland
|
#20
|
My N9/N950 projects: