В проге то экран тоже поворачивается, ток внутренние элементы уходят вправо!
Вот мои основные файлы проекта:
Main.cpp
[codebox]
#include <QtGui/QApplication>
#include "qmlapplicationviewer.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QmlApplicationViewer viewer;
viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
viewer.setMainQmlFile(QLatin1String("qml/QMLViewerTest/main.qml"));
viewer.showExpanded();
return app.exec();
}
[/codebox]Main.qml
[codebox]
import QtQuick 1.0
Rectangle {
id: mainrect
width: 1024
height: 600
// anchors.fill: parent - так я уже пробовал ниче не работает (вообще черный экран тогда)
// также убирал width и height вообще при включении anchors.fill
property int manhetten1: 1
gradient: Gradient {
GradientStop { position: 0.0; color: "#0f0f0f" }
GradientStop { position: 1.0; color: "silver" }
}
Row {
id: toprow
height: 35
width: parent.width
anchors.top: parent.top
spacing: 2
TopButton {
text: "Контора 1 (Юрина 200)"
width: ((toprow.width / 2) - 1);
color: ((mainrect.mx1 == 1) ? "yellow" : "white");
onClicked: {
mainrect.mx1 = 1;
}
}
TopButton {
text: "Контора 2"
width: ((toprow.width / 2) - 1);
color: ((mainrect.mx1 == 2) ? "yellow" : "white");
onClicked: {
mainrect.mx1 = 2;
}
}
}
Item {
id: centralarea;
x: 0;
y: 35;
width: parent.width;
height: (parent.height - 75);
GeneralPanel {
}
}
Item {
id: statusbar;
width: parent.width;
height: 40;
anchors.bottom: parent.bottom;
}
}
[/codebox]Подскажите что делать?
(Блин чета теги не сработали! писал в одной строке так [ codebox ] [ code = cpp ] без пробелов конечно)
Прошу не обращять внимания на mx1! Это manhetten1 (просто я забыл подправить здесь)