qt

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

dyvniy M
Topic author, Администратор
Администратор
Avatar
dyvniy M
Topic author, Администратор
Администратор
Age: 36
Reputation: 1
Loyalty: 1
Posts: 3159
Joined: Wed, 10 Oct 2012
With us: 6 years 9 months
Профессия: Программист
Location: Россия, Москва
ICQ Website Skype VK

#61by dyvniy » Fri, 29 Dec 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 есть описание.
Image

dyvniy M
Topic author, Администратор
Администратор
Avatar
dyvniy M
Topic author, Администратор
Администратор
Age: 36
Reputation: 1
Loyalty: 1
Posts: 3159
Joined: Wed, 10 Oct 2012
With us: 6 years 9 months
Профессия: Программист
Location: Россия, Москва
ICQ Website Skype VK

#62by dyvniy » Wed, 31 Jan 2018, 16:47:00

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

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

dyvniy M
Topic author, Администратор
Администратор
Avatar
dyvniy M
Topic author, Администратор
Администратор
Age: 36
Reputation: 1
Loyalty: 1
Posts: 3159
Joined: Wed, 10 Oct 2012
With us: 6 years 9 months
Профессия: Программист
Location: Россия, Москва
ICQ Website Skype VK

#63by dyvniy » Thu, 1 Mar 2018, 15:51:05

qml and qjsengine instead of qtscript
http://lists.qt-project.org/pipermail/interest/2015-March/015971.html
Spoiler
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
Image

dyvniy M
Topic author, Администратор
Администратор
Avatar
dyvniy M
Topic author, Администратор
Администратор
Age: 36
Reputation: 1
Loyalty: 1
Posts: 3159
Joined: Wed, 10 Oct 2012
With us: 6 years 9 months
Профессия: Программист
Location: Россия, Москва
ICQ Website Skype VK

#64by dyvniy » Thu, 1 Mar 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.

есть.
Image

dyvniy M
Topic author, Администратор
Администратор
Avatar
dyvniy M
Topic author, Администратор
Администратор
Age: 36
Reputation: 1
Loyalty: 1
Posts: 3159
Joined: Wed, 10 Oct 2012
With us: 6 years 9 months
Профессия: Программист
Location: Россия, Москва
ICQ Website Skype VK

#65by dyvniy » Thu, 8 Mar 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

Code: Select all

#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();
Image

dyvniy M
Topic author, Администратор
Администратор
Avatar
dyvniy M
Topic author, Администратор
Администратор
Age: 36
Reputation: 1
Loyalty: 1
Posts: 3159
Joined: Wed, 10 Oct 2012
With us: 6 years 9 months
Профессия: Программист
Location: Россия, Москва
ICQ Website Skype VK

#66by dyvniy » Sat, 10 Mar 2018, 13:19:33

Attachments
QtWebApp.zip
(130.59 KiB) Downloaded 12 times
Image


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

Quick reply


Enter the code exactly as it appears. All letters are case insensitive.
Confirmation code
:) ;) :hihi: :P :hah: :haha: :angel: :( :st: :_( :cool: 8-| :beee: :ham: :rrr: :grr: :* :secret: :stupid: :music: View more smilies
   

Return to “Программирование (под Desktop и Android)”

Who is online (over the past 15 minutes)

Users browsing this forum: 1 guest