qt

Описание: Разработка и отладка приложений. Упор на 3D-графику.

dyvniy M
Автор темы, Администратор
Администратор
Аватара
dyvniy M
Автор темы, Администратор
Администратор
Возраст: 41
Репутация: 1
Лояльность: 1
Сообщения: 3579
Зарегистрирован: Ср, 10 октября 2012
С нами: 11 лет 5 месяцев
Профессия: Программист
Откуда: Россия, Москва
ICQ Сайт Skype ВКонтакте

#61 dyvniy » Пт, 29 декабря 2017, 16:26:34

То же для андроида
http://www.cyberforum.ru/qt/thread1064604.html
Проекты -> Запуск -> Конфигурации установки -> Создать манифест. В редакторе манифеста прописываем значки.
Тут подробнее
https://webhamster.ru/mytetrashare/index/mtb0/13891884597rqld1m7lq
Открыть настройки проекта Run->Deploy Configurations, там нажать Create AndroidManifest.xml.
После создания открываем этот файл манифеста в Qt Креаторе и там есть раздел куда нужно добавить 3 формата иконок: ldpi, mdpi, hdpi.
http://qt-project.org/doc/qtcreator-3.0/creator-deploying-android.html
В разделе Editing Manifest Files есть описание.
Изображение

dyvniy M
Автор темы, Администратор
Администратор
Аватара
dyvniy M
Автор темы, Администратор
Администратор
Возраст: 41
Репутация: 1
Лояльность: 1
Сообщения: 3579
Зарегистрирован: Ср, 10 октября 2012
С нами: 11 лет 5 месяцев
Профессия: Программист
Откуда: Россия, Москва
ICQ Сайт Skype ВКонтакте

#62 dyvniy » Ср, 31 января 2018, 16:47:00

Звуки. Может выйдет из использовать?
http://doc.qt.io/qt-5/audiooverview.html

Инсталляторы надо сюда добавить
_
Изображение

dyvniy M
Автор темы, Администратор
Администратор
Аватара
dyvniy M
Автор темы, Администратор
Администратор
Возраст: 41
Репутация: 1
Лояльность: 1
Сообщения: 3579
Зарегистрирован: Ср, 10 октября 2012
С нами: 11 лет 5 месяцев
Профессия: Программист
Откуда: Россия, Москва
ICQ Сайт Skype ВКонтакте

#63 dyvniy » Чт, 1 марта 2018, 15:51:05

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
Изображение

dyvniy M
Автор темы, Администратор
Администратор
Аватара
dyvniy M
Автор темы, Администратор
Администратор
Возраст: 41
Репутация: 1
Лояльность: 1
Сообщения: 3579
Зарегистрирован: Ср, 10 октября 2012
С нами: 11 лет 5 месяцев
Профессия: Программист
Откуда: Россия, Москва
ICQ Сайт Skype ВКонтакте

#64 dyvniy » Чт, 1 марта 2018, 16:16:16

Есть ли какая-то возможность выполнять 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.

есть.
Изображение

dyvniy M
Автор темы, Администратор
Администратор
Аватара
dyvniy M
Автор темы, Администратор
Администратор
Возраст: 41
Репутация: 1
Лояльность: 1
Сообщения: 3579
Зарегистрирован: Ср, 10 октября 2012
С нами: 11 лет 5 месяцев
Профессия: Программист
Откуда: Россия, Москва
ICQ Сайт Skype ВКонтакте

#65 dyvniy » Чт, 8 марта 2018, 23:45:29

How to write a text around a circle using QPainter class?
пишем текст по кругу
https://stackoverflow.com/questions/17753657/how- ... -a-circle-using-qpainter-class

Код: Выделить всё

#include <QtGui>
#include <cmath>

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.00.0));

        
QPointF c1(width()*0.2,height()*0.8);
        
QPointF c2(width()*0.8,height()*0.2);

        
path.cubicTo(c1,c2,QPointF(width(),height()));

        
//draw the bezier curve
        
painter.drawPath(path);

        
//Make the painter ready to draw chars
        
QFont font painter.font();
        
font.setPixelSize(drawWidth*2);
        
painter.setFont(font);
        
pen.setColor(Qt::red);
        
painter.setPen(pen);

        
qreal percentIncrease = (qreal1/(hw.size()+1);
        
qreal percent 0;

        for ( 
int i 0hw.size(); i++ ) {
            
percent += percentIncrease;

            
QPointF point path.pointAtPercent(percent);
            
qreal angle path.angleAtPercent(percent);   // Clockwise is negative

            
painter.save();
            
// Move the virtual origin to the point on the curve
            
painter.translate(point);
            
// Rotate to match the angle of the curve
            // Clockwise is positive so we negate the angle from above
            
painter.rotate(-angle);
            
// Draw a line width above the origin to move the text above the line
            // and let Qt do the transformations
            
painter.drawText(QPoint(0, -pen.width()),QString(hw[i]));
            
painter.restore();
        }
    }

};

int main(int argcchar **argv)
{
    
QApplication app(argcargv);
    
Widget widget;
    
widget.show();
    return 
app.exec();
Изображение

dyvniy M
Автор темы, Администратор
Администратор
Аватара
dyvniy M
Автор темы, Администратор
Администратор
Возраст: 41
Репутация: 1
Лояльность: 1
Сообщения: 3579
Зарегистрирован: Ср, 10 октября 2012
С нами: 11 лет 5 месяцев
Профессия: Программист
Откуда: Россия, Москва
ICQ Сайт Skype ВКонтакте

#66 dyvniy » Сб, 10 марта 2018, 13:19:33

Вложения
QtWebApp.zip
(130.59 КБ) 83 скачивания
Изображение


Название раздела: Программирование (под Desktop и Android)
Описание: Разработка и отладка приложений. Упор на 3D-графику.

Быстрый ответ


Введите код в точности так, как вы его видите. Регистр символов не имеет значения.
Код подтверждения
:) ;) :hihi: :P :hah: :haha: :angel: :( :st: :_( :cool: 8-| :beee: :ham: :rrr: :grr: :* :secret: :stupid: :music: Ещё смайлики…
   

Вернуться в «Программирование (под Desktop и Android)»

Кто сейчас на форуме (по активности за 15 минут)

Сейчас этот раздел просматривают: 7 гостей