Страница 11 из 12
Добавлено: Пт, 29 декабря 2017, 16:26:34
dyvniy
То же для андроида
http://www.cyberforum.ru/qt/thread1064604.htmlПроекты -> Запуск -> Конфигурации установки -> Создать манифест. В редакторе манифеста прописываем значки.
Тут подробнее
https://webhamster.ru/mytetrashare/index/mtb0/13891884597rqld1m7lq
Добавлено: Ср, 31 января 2018, 16:47:00
dyvniy
Звуки. Может выйдет из использовать?
http://doc.qt.io/qt-5/audiooverview.htmlИнсталляторы надо сюда добавить
_
Добавлено: Чт, 1 марта 2018, 15:51:05
dyvniy
qml and qjsengine instead of qtscript
http://lists.qt-project.org/pipermail/interest/2015-March/015971.html- Спойлер
- Hello all,
thanks for all the feedback, it's very much appreciated.
The discussion has sparked quite a few discussions here in Oslo and we see
that we have some way to cover when it comes to getting QJSEngine up to the
level of what QtScript offers currently.
We think being able to run non-gui applications is important, that's why we
have a clean separation between the QML and Quick libraries. Using only the
QML library there are no UI dependencies and QJSEngine is available as a pure
JS engine without forcing any QML on anyone.
We still think it's the right way forward - maintaining one engine and keeping
it running well, instead of trying to deal with JSC, see Thiago's mails for
the reasoning behind that (plus the one in WebEngine which is unrelated to
this discussion).
The deprecation is just the label that reflects reality for QtScript. There is
no work being done on the module actively.
The focus will now be to get the missing features in place in QJSEngine. Most
of them hopefully by the time of the 5.6 release, to get the offering on par.
It would be helpful to get a list of features that really need to be there,
currently from what I understand the most urgent ones are:
- instantiating QObjects from JS
- exposing individual native functions to JS
- debugging API
The good thing is that a lot of the work is already done in QJSEngine, it's
simply not exposed in the API yet.
To re-iterate: QtScript is not going away, especially not before we have a
full replacement including more porting documentation. But don't expect active
development of the module to happen either. For many simple use cases,
QJSEngine can act as drop in replacement by the way, so we do care about the
migration path and try to keep API compatible where it is possible.
Greetings,
Frederik
Добавлено: Чт, 1 марта 2018, 16:16:16
dyvniy
Есть ли какая-то возможность выполнять JS-код построчно (трассировать) кроме как с использованием старого и deprecated QtScript модуля и старого JS-движка из него?
И тот же вопрос насчет дебага JS-кода. Какие планы у Qt-шников на этот счет?
===============
Qt QML
All debug services now work with QJSEngine rather than QQmlEngine, which allows for non-QML JavaScript debugging or profiling.
The JavaScript debug service now supports debugging of multiple QJSEngine instances at the same time.
The profiler service can generate much larger traces without running out of memory, and will take much less time to do so now.
Custom connectors for debugging and profiling can be loaded with QQmlDebuggingEnabler::startDebugConnector() now.
The JavaScript debug service can now evaluate expressions without the QML engine being paused in a breakpoint.
есть.
Добавлено: Чт, 8 марта 2018, 23:45:29
dyvniy
How to write a text around a circle using QPainter class?
пишем текст по кругу
https://stackoverflow.com/questions/17753657/how- ... -a-circle-using-qpainter-classКод: Выделить всё
class Widget : public QWidget
{
public:
Widget ()
: QWidget() { }
private:
void paintEvent ( QPaintEvent *)
{
QString hw("hello world");
int drawWidth = width() / 100;
QPainter painter(this);
QPen pen = painter.pen();
pen.setWidth(drawWidth);
pen.setColor(Qt::darkGreen);
painter.setPen(pen);
QPainterPath path(QPointF(0.0, 0.0));
QPointF c1(width()*0.2,height()*0.8);
QPointF c2(width()*0.8,height()*0.2);
path.cubicTo(c1,c2,QPointF(width(),height()));
painter.drawPath(path);
QFont font = painter.font();
font.setPixelSize(drawWidth*2);
painter.setFont(font);
pen.setColor(Qt::red);
painter.setPen(pen);
qreal percentIncrease = (qreal) 1/(hw.size()+1);
qreal percent = 0;
for ( int i = 0; i < hw.size(); i++ ) {
percent += percentIncrease;
QPointF point = path.pointAtPercent(percent);
qreal angle = path.angleAtPercent(percent); painter.save();
painter.translate(point);
painter.rotate(-angle);
painter.drawText(QPoint(0, -pen.width()),QString(hw[i]));
painter.restore();
}
}
};
int main(int argc, char **argv)
{
QApplication app(argc, argv);
Widget widget;
widget.show();
return app.exec();
}
Добавлено: Сб, 10 марта 2018, 13:19:33
dyvniy