Re: [Interest] How to properly show progress for a signal processing pipeline

2019-04-08 Thread Igor Mironchik

Hi,

Have a look at Qt Maintenance Tool download meta information progress bar...

On 08.04.2019 18:04, Tony Rietwyk wrote:

Hi Sean,

I would just show one progress set to 3 * raw count.  Each stage 
periodically signals to the ui thread its progress, and whether it has 
processed the end-of-data signal from the previous stage.  In the ui 
thread slot:


int totalCount, rawCount;

QVector stageProgress;

void stageProgressSlot(int stageIndex, int count, bool completed) {

    Q_ASSERT(count <= rawCount);

    auto thisCount = (if completed ? rawCount : count);

    Q_ASSERT(thisCount >= stageProgress[stageIndex]);

    totalCount += thisCount - stageProgress[stageIndex];

    stageProgress[stageIndex] = thisCount;

    ui->progress->setValue(totalCount);

}

It will always appear to start slowly then jump forward depending on 
the degree of filtering.  I can't see a way to avoid that other than 
Bill's idea.


Hope that helps,  Tony


On 9/04/2019 12:16 am, william.croc...@analog.com wrote:




  So the issue I'm having here is that I want to show the user some 
sort of progress indicator (this whole pipeline takes a bit of 
time), but at the start I only know the raw count, not any of the 
intermediate or final counts. And because the A->B->Final portion of 
the pipeline takes a noticeable amount of time, I can't just run the 
progress bar from 0 to Raw count, because then from the user's 
standpoint the progress bar would reach 100% once the number of raw 
samples is exhausted, not when processing is fully complete.




You could show three progress bars, one for each stage.
Assume each item will pass through each stage (which is pessimistic)
and show progress based on that. In most cases the whole
process will finish early based on the bars, but progress
will be shown.

Bill
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] QSkyboxEnity is broken in Qt 5.12.1

2019-02-22 Thread Igor Mironchik

Hello,

Can anybody reproduce that QSkyboxEntity is broken in Qt 5.12.1 with 
following debug message?


"QTextureImage only supports local url"

Skybox just black.

I can reproduce it with my own application and with qt3d/tests/manual/skybox

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] What is the Qt 5.12.1 snapshot?

2019-01-24 Thread Igor Mironchik

Hi,

What is the Qt 5.12.1 snapshot available? Is it a release? Or something 
else?


Thanks.

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Disable highlighting in QTreeView

2018-11-13 Thread Igor Mironchik

Hi,

You can override

[virtual protected] voidQTreeView::drawRow(QPainter*painter, const 
QStyleOptionViewItem, const QModelIndex) const


On 13.11.2018 18:12, Nicolas Krieger wrote:


Hi,

Another question about QTreeView, how to disable row highlighting ?

I could'nt find any solution without using css.

--
*Nicolas Krieger*

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QTextEdit - Line Spacing

2018-11-11 Thread Igor Mironchik

Hi,

I guess you need to implement QAbstractTextDocumentLayout.

On 11.11.2018 16:11, coroberti . wrote:

Hi,
It seems that arranging line spacing for text in QTextEdit (like 1.5,
2, 3 lines) is not an easy coding.

Any code samples, directions, howtos would be very much appreciated.

Thanks in advance!

Kind regards,
Robert
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Calling QMainWindow::close() vs. clicking on close button in title bar

2018-10-31 Thread Igor Mironchik

Hi,

I can suggest

void Main3DWindow::closeEvent(QCloseEvent *e)
{
    hide();

    e->ignore();
}

On 31.10.2018 21:13, Andy wrote:

Thanks Giuseppe.

Reported with example code here: 
https://bugreports.qt.io/browse/QTBUG-71519


I wasn't sure what to use for Components, but my main issue is with 
Qt3D not working properly in this context.


---
Andy Maloney  // https://asmaloney.com
twitter ~ @asmaloney 



On Wed, Oct 31, 2018 at 6:03 AM Giuseppe D'Angelo via Interest 
mailto:interest@qt-project.org>> wrote:


Il 30/10/18 13:53, Andy ha scritto:
> Turns out that if you have a QMainWindow containing a QWindow
(e.g. by
> using QWidget::createWindowContainer()):
>
>    - if you call QMainWindow::close(), the QWindow receives
QEvent::Hide
> and does the right thing
>    - if you click the close button in the title bar, the QWindow
> receives QEvent::Close which calls QWindow::destroy()
>
> This is not what I would expect. Is this by design?
>
> The QWidget::createWindowContainer docs don't mention this as a
limitation.

Smells like a bug to me, please report it.

HTH,

-- 
Giuseppe D'Angelo | giuseppe.dang...@kdab.com

 | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

___
Interest mailing list
Interest@qt-project.org 
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Android] Qt machine unique id

2018-10-10 Thread Igor Mironchik

Hi,

Maybe MAC address of the network interface is good enough for you?


On 10.10.2018 16:38, Jérôme Godbout wrote:

Hi,
what is the best way to identify a device even if os is updated or 
factory reset, etc?

My use case is the following:

 1. The user is used to identify itself and log in (security is
managed with a secure connection to server from the application).
 2. I have some settings and device history on the server and I would
like to tell the server the user is using which of his device
automatically. I wish I would have this identification persistent
over application update and reinstall.
 3. id persistent from factory reset might not be necessary.
 4. I would like it to work on Android, if possible on iOS too (iOS is
not mandatory).

I was looking at QSysInfo::machineUniqueId(), but I'm not sure it will 
fit the bill, anyone have a good way to do this?


--



RAPPROCHEZ LA DISTANCE



*Jérôme Godbout
*Senior Software Developer

*p:*+1 (418) 800-1073 ext.:109

*m:* +1 (581) 777-0050

amotus.ca 
statum-iot.com 



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QTextEdit with QDockWidget

2018-09-28 Thread Igor Mironchik

Hi,

I found a mistake: I shared the same QTextDocument between 2 QTextEdit. 
First was initialized and shown, had correct width, whereas second 
wasn't initialized yet and had small width. So text was wrapped to 
smaller width.


Thank you.


On 28.09.2018 17:26, Igor Mironchik wrote:


Hello,

I have a dock widget with text edit field. When I set document to 
QTextEdit document layouts with smaller width than width of QTextEdit. 
Look.


Small width

I can't do so to enlarge the width of the text. But when I put enough 
text to fit all height then width of the text begin regards the width 
of QTextEdit. Loook.


Good width

Does anybody know how to fix this problem to force the document to 
regard the width of the control?


Thank you.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QTextEdit with QDockWidget

2018-09-28 Thread Igor Mironchik

And this happens only when I use text edit in QDockWidget...


On 28.09.2018 17:34, william.croc...@analog.com wrote:

On 09/28/2018 10:26 AM, Igor Mironchik wrote:

Hello,

I have a dock widget with text edit field. When I set document to 
QTextEdit

document layouts with smaller width than width of QTextEdit. Look.

Small width

I can't do so to enlarge the width of the text. But when I put enough 
text to
fit all height then width of the text begin regards the width of 
QTextEdit. Loook.


Good width

Does anybody know how to fix this problem to force the document to 
regard the

width of the control?



You could start by changing the background color of the QTexEdit so 
you can see what it's

width really is.
- Is it narrow, not filling the dialog and does that explain to the 
narrow

  appearance.
- Or is it filling the dialog as desired and it, internally is 
squeezing the text

  for some reason.

Bill


Thank you.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QTextEdit with QDockWidget

2018-09-28 Thread Igor Mironchik

Hi,

Background filling as desired, whole QTextEdit.

I used:

    QPalette p = palette();
    p.setColor(QPalette::Base, Qt::red);
    setPalette(p);


On 28.09.2018 17:34, william.croc...@analog.com wrote:

On 09/28/2018 10:26 AM, Igor Mironchik wrote:

Hello,

I have a dock widget with text edit field. When I set document to 
QTextEdit

document layouts with smaller width than width of QTextEdit. Look.

Small width

I can't do so to enlarge the width of the text. But when I put enough 
text to
fit all height then width of the text begin regards the width of 
QTextEdit. Loook.


Good width

Does anybody know how to fix this problem to force the document to 
regard the

width of the control?



You could start by changing the background color of the QTexEdit so 
you can see what it's

width really is.
- Is it narrow, not filling the dialog and does that explain to the 
narrow

  appearance.
- Or is it filling the dialog as desired and it, internally is 
squeezing the text

  for some reason.

Bill


Thank you.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QTextEdit with QDockWidget

2018-09-28 Thread Igor Mironchik

Hello,

I have a dock widget with text edit field. When I set document to 
QTextEdit document layouts with smaller width than width of QTextEdit. Look.


Small width

I can't do so to enlarge the width of the text. But when I put enough 
text to fit all height then width of the text begin regards the width of 
QTextEdit. Loook.


Good width

Does anybody know how to fix this problem to force the document to 
regard the width of the control?


Thank you.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt with latest Android SDK

2018-09-26 Thread Igor Mironchik

Big thanks guys, Java 8 from Oracle, NDK r17. And all is fine.


On 26.09.2018 13:24, Ivan Donchevskii wrote:


> Use r10e unless you know why you don't.

You don't need to do that. r17 works quite fine with Qt Creator. But 
you may have issues with r18 since it has gcc removed.


Ivan


*From:* Interest 
 on behalf of 
Stanislas RENAN 

*Sent:* Wednesday, September 26, 2018 12:22:30 PM
*To:* interest@qt-project.org
*Subject:* Re: [Interest] Qt with latest Android SDK

Le 26/09/2018 à 12:17, Igor Mironchik a écrit :


Hi,


On 26.09.2018 13:12, Stanislas RENAN wrote:


Hi,

Have you followed these steps ?



Sure.

Good.



In particular, what is the version of your NDK ?



18.0.5002713

Not good.
https://developer.android.com/ndk/downloads/revision_history
Check the procedure again for missed steps.
Use r10e unless you know why you don't.




http://doc.qt.io/qt-5/androidgs.html

Regards,

Stanislas RENAN


Le 26/09/2018 à 11:20, Igor Mironchik a écrit :


Hello,

I'm on Linux, installed latest Android SDK and NDK, trying to build 
project for Android...


12:17:30: Running steps for project Pro...

12:17:30: Starting: "/home/igor/Qt/5.11.2/android_armv7/bin/qmake" 
/home/igor/Work/Projects/pro/Pro.pro -spec android-g++ 
CONFIG+=debug CONFIG+=qml_debug


clang++: error: unknown argument: '-mthumb-interwork'

Project ERROR: failed to parse default search paths from compiler 
output


12:17:30: The process 
"/home/igor/Qt/5.11.2/android_armv7/bin/qmake" exited with code 3.


Error while building/deploying project Pro (kit: Android for 
armeabi-v7a (GCC 4.9, Qt 5.11.2 for Android ARMv7))


When executing step "qmake"

12:17:30: Elapsed time: 00:00.

What is it? Why clang++? Thank you.



___
Interest mailing list
Interest@qt-project.org <mailto:Interest@qt-project.org>
http://lists.qt-project.org/mailman/listinfo/interest




___
Interest mailing list
Interest@qt-project.org <mailto:Interest@qt-project.org>
http://lists.qt-project.org/mailman/listinfo/interest




___
Interest mailing list
Interest@qt-project.org <mailto:Interest@qt-project.org>
http://lists.qt-project.org/mailman/listinfo/interest




___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt with latest Android SDK

2018-09-26 Thread Igor Mironchik

Hi,


On 26.09.2018 13:12, Stanislas RENAN wrote:


Hi,

Have you followed these steps ?



Sure.


In particular, what is the version of your NDK ?



18.0.5002713


http://doc.qt.io/qt-5/androidgs.html

Regards,

Stanislas RENAN


Le 26/09/2018 à 11:20, Igor Mironchik a écrit :


Hello,

I'm on Linux, installed latest Android SDK and NDK, trying to build 
project for Android...


12:17:30: Running steps for project Pro...

12:17:30: Starting: "/home/igor/Qt/5.11.2/android_armv7/bin/qmake" 
/home/igor/Work/Projects/pro/Pro.pro -spec android-g++ CONFIG+=debug 
CONFIG+=qml_debug


clang++: error: unknown argument: '-mthumb-interwork'

Project ERROR: failed to parse default search paths from compiler output

12:17:30: The process "/home/igor/Qt/5.11.2/android_armv7/bin/qmake" 
exited with code 3.


Error while building/deploying project Pro (kit: Android for 
armeabi-v7a (GCC 4.9, Qt 5.11.2 for Android ARMv7))


When executing step "qmake"

12:17:30: Elapsed time: 00:00.

What is it? Why clang++? Thank you.



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest




___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qt with latest Android SDK

2018-09-26 Thread Igor Mironchik

Hello,

I'm on Linux, installed latest Android SDK and NDK, trying to build 
project for Android...


12:17:30: Running steps for project Pro...

12:17:30: Starting: "/home/igor/Qt/5.11.2/android_armv7/bin/qmake" 
/home/igor/Work/Projects/pro/Pro.pro -spec android-g++ CONFIG+=debug 
CONFIG+=qml_debug


clang++: error: unknown argument: '-mthumb-interwork'

Project ERROR: failed to parse default search paths from compiler output

12:17:30: The process "/home/igor/Qt/5.11.2/android_armv7/bin/qmake" 
exited with code 3.


Error while building/deploying project Pro (kit: Android for armeabi-v7a 
(GCC 4.9, Qt 5.11.2 for Android ARMv7))


When executing step "qmake"

12:17:30: Elapsed time: 00:00.

What is it? Why clang++? Thank you.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt.labs.platform

2018-09-12 Thread Igor Mironchik



On 12.09.2018 17:53, Mitch Curtis wrote:

-Original Message-
From: Interest  On
Behalf Of Igor Mironchik
Sent: Wednesday, 12 September 2018 3:49 PM
To: interest@qt-project.org
Subject: [Interest] Qt.labs.platform

I'm on Linux with static Qt, I link my app to libqtlabsplatformplugin.a

I've got the following error

module "Qt.labs.platform" plugin "qtlabsplatformplugin" not found

Does it mean that I linked with wrong order, or it tells about something
different?

Are you sure the static plugin exists in your Qt build?

Try running the application with QML_IMPORT_TRACE=1 and provide the output here.


QQmlImports(qrc:/qml/app.qml)::addLibraryImport: "Qt.labs.platform" 1.0 
as ""
QQmlImports(qrc:/qml/app.qml)::importExtension: loaded 
"/home/.../Qt5/qml/Qt/labs/platform/qmldir"

...
    qrc:/qml/app.qml:6:1: module "Qt.labs.platform" plugin 
"qtlabsplatformplugin" not found


It's probably not related, but you should also make sure you have QT += widgets 
in your .pro.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qt.labs.platform

2018-09-12 Thread Igor Mironchik

I'm on Linux with static Qt, I link my app to libqtlabsplatformplugin.a

I've got the following error

module "Qt.labs.platform" plugin "qtlabsplatformplugin" not found

Does it mean that I linked with wrong order, or it tells about something 
different?


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Painting with QPainter to QPixmap in C++ method invoked from QML

2018-09-12 Thread Igor Mironchik

Hello.

Let's say I have C++ code to draw to QPixmap with QPainter.

This code returns data:image/png;base64,... string that can be used in QML.

But when I invoke this method from QML I've got

QPainter::begin: Paint device returned engine == 0, type: 2

So my question is how can I draw with QPainter in back-end from QML?

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Debugging on Kubuntu 18.04

2018-08-05 Thread Igor Mironchik




On 05.08.2018 18:31, Thiago Macieira wrote:

On Sunday, 5 August 2018 03:46:49 PDT Igor Mironchik wrote:

Hello,

I upgraded to Kubuntu 18.04 and can't anymore debug one application:

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-igor'

qt.qpa.screen: QXcbConnection: Could not connect to display

Could not connect to any X display.

Debug fails in QApplication constructor. How can I fix it? Thank you.

How are you starting this application? It looks like the environment is not
properly set.


I start from QtCreator external application for debugging.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Debugging on Kubuntu 18.04

2018-08-05 Thread Igor Mironchik

Hello,

I upgraded to Kubuntu 18.04 and can't anymore debug one application:

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-igor'

qt.qpa.screen: QXcbConnection: Could not connect to display

Could not connect to any X display.

Debug fails in QApplication constructor. How can I fix it? Thank you.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QtCreator 4.7.0

2018-07-26 Thread Igor Mironchik

Hi,

Did you notice that after updating of QtCreator to 4.7.0 it began crash 
every 2-3 time on opening *.ui file?


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Raise QML window on top

2018-07-21 Thread Igor Mironchik

mainWindow.flags &= ~Qt.WindowMinimized
mainWindow.flags |= Qt.WindowActive

These two lines are absolutely wrong...


On 21.07.2018 07:45, Igor Mironchik wrote:

Hi,

How can I raise QML window on top? I load window with

QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));

I tried following in the main.qml

function raiseWindow() {
    mainWindow.flags &= ~Qt.WindowMinimized
    mainWindow.flags |= Qt.WindowActive
    mainWindow.raise()
    mainWindow.flags |= Qt.WindowStaysOnTopHint
    mainWindow.flags &= ~Qt.WindowStaysOnTopHint
   }

But at least on Linux it doesn't work.

Thank you.



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Raise QML window on top

2018-07-20 Thread Igor Mironchik

Hi,

How can I raise QML window on top? I load window with

QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));

I tried following in the main.qml

function raiseWindow() {
    mainWindow.flags &= ~Qt.WindowMinimized
    mainWindow.flags |= Qt.WindowActive
    mainWindow.raise()
    mainWindow.flags |= Qt.WindowStaysOnTopHint
    mainWindow.flags &= ~Qt.WindowStaysOnTopHint
   }

But at least on Linux it doesn't work.

Thank you.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] DBus Notifications and clicks

2018-07-20 Thread Igor Mironchik

Hello,

I use DBus to push desktop notifications. DBus interface is 
"org.freedesktop.Notifications", method is "Notify".


Amazing. It works. But is it possible to distinguish somehow if 
notification was closed, clicked, timeouted?


Thank you.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Statically linked Qt

2018-07-19 Thread Igor Mironchik

Hi,


On 19.07.2018 17:37, Thiago Macieira wrote:

On Thursday, 19 July 2018 00:12:49 PDT Igor Mironchik wrote:

I can't link statically with Qt, some undefined references to libQt5DBus.

For example

qt-everywhere-src-5.11.1/qtbase/include/QtCore/../../src/corelib/tools/qlist
.h:475: undefined reference to
`QDBusUnixFileDescriptor::QDBusUnixFileDescriptor(QDBusUnixFileDescriptor
const&)'

Please confirm that
  a) libQt5DBus.a exists
  b) qdbusunixfiledescriptor.o was compiled (qtbase/src/dbus)
  c) the copy constructor is defined in that .o (use nm to see)


a, b, c - YES. With Qt all is fine.

Was problem in order of linking.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Statically linked Qt

2018-07-19 Thread Igor Mironchik

Hello,

I can't link statically with Qt, some undefined references to libQt5DBus.

For example

qt-everywhere-src-5.11.1/qtbase/include/QtCore/../../src/corelib/tools/qlist.h:475: 
undefined reference to 
`QDBusUnixFileDescriptor::QDBusUnixFileDescriptor(QDBusUnixFileDescriptor 
const&)'

collect2: error: ld returned 1 exit status

And sure I do

TARGET_LINK_LIBRARIES( app
   Qt5::Widgets
   Qt5::Qml
   Qt5::Gui
   Qt5::DBus
   Qt5::Network
   Qt5::PrintSupport
   Qt5::Core
   )

What can be the reason of the problem?

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Building QT 5.11 on Windows with MSVC 2017

2018-06-14 Thread Igor Mironchik

Maybe anybody have any idea how to solve this?


14-Jun-18 21:51, Thiago Macieira пишет:

On Thursday, 14 June 2018 08:34:19 PDT Igor Mironchik wrote:

Hello, did anybody have such a problem?

qlalr

No.



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Building QT 5.11 on Windows with MSVC 2017

2018-06-14 Thread Igor Mironchik

Hello, did anybody have such a problem?

qlalr
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] (code) Cannot map videoforames for QAbstractVideoSurface::present

2018-06-14 Thread Igor Mironchik

Hi,

Start from here:

bool
Frames::present( const QVideoFrame & frame )
{
  if( !isActive() )
    return false;

  QVideoFrame f = frame;
  f.map( QAbstractVideoBuffer::ReadOnly );

  QImage image( f.bits(), f.width(), f.height(), f.bytesPerLine(),
    QVideoFrame::imageFormatFromPixelFormat( f.pixelFormat() ) );

  f.unmap();

  emit newFrame( image.copy( image.rect() ) );

  return true;
}

This works for me...


14-Jun-18 17:52, Jason H пишет:

I have no idea what I'm doing wrong. Can someone this and let me know?
The frames I'm getting are BGR32, so I have special code for that.
But I'm getting the message "QVideoFrame::unmap() was called more times then 
QVideoFrame::map()"
Which is obviously not the case.

To restate the problems:
1. I only get to present() once
2. I's failing to map frames
3. "then" in the message should be "than"

Here's the first 3 lines of the .pro and complete code:
extractframes.pro-
QT += multimedia
CONFIG += c++11 console
CONFIG -= app_bundle

main.cpp--
#include 
#include 
#include 
#include 

#include 

class VideoSurface: public QAbstractVideoSurface {
int _frameNumber;
QVideoSurfaceFormat _format;
QString _prefix;
int _frameInterval;
public:
VideoSurface(const QString , int frameInterval): 
_prefix(prefix), _frameInterval(frameInterval) {}

bool present(const QVideoFrame ) override {
qDebug() << Q_FUNC_INFO << _frameNumber << frame.isValid();

if (_frameNumber % _frameInterval == 0) {
QVideoFrame frame2(frame);
frame2.map(QAbstractVideoBuffer::ReadOnly);
QImage image;

if (frame2.pixelFormat() == QVideoFrame::Format_BGR32) {
 image =  QImage(frame2.bits(), frame2.width(), 
frame2.height(), QImage::Format_RGB32);
 image = image.rgbSwapped();
} else {
image =  QImage(frame2.bits(), frame2.width(), 
frame2.height(), QVideoFrame::imageFormatFromPixelFormat(frame2.pixelFormat()));
}

frame2.unmap();
QString filename = QString(_prefix).arg(_frameNumber);
bool result = image.save(filename);
qDebug() << Q_FUNC_INFO << filename << result;
}
_frameNumber ++;
return true;
}

bool start(const QVideoSurfaceFormat ) override {
qDebug() << Q_FUNC_INFO;
_format = format;
_frameNumber = 0;
QAbstractVideoSurface::start(format);
return true;
}
void stop() override {
qDebug() << Q_FUNC_INFO;
QAbstractVideoSurface::stop();
}
QList 
supportedPixelFormats(QAbstractVideoBuffer::HandleType handleType) const override
{
Q_UNUSED(handleType);
return QList()
<< QVideoFrame::Format_ARGB32
<< QVideoFrame::Format_ARGB32_Premultiplied
<< QVideoFrame::Format_RGB32
<< QVideoFrame::Format_RGB24
<< QVideoFrame::Format_RGB565
<< QVideoFrame::Format_RGB555
<< QVideoFrame::Format_ARGB8565_Premultiplied
<< QVideoFrame::Format_BGRA32
<< QVideoFrame::Format_BGRA32_Premultiplied
<< QVideoFrame::Format_BGR32
<< QVideoFrame::Format_BGR24
<< QVideoFrame::Format_BGR565
<< QVideoFrame::Format_BGR555
<< QVideoFrame::Format_BGRA5658_Premultiplied
<< QVideoFrame::Format_AYUV444
<< QVideoFrame::Format_AYUV444_Premultiplied
<< QVideoFrame::Format_YUV444
<< QVideoFrame::Format_YUV420P
<< QVideoFrame::Format_YV12
<< QVideoFrame::Format_UYVY
<< QVideoFrame::Format_YUYV
<< QVideoFrame::Format_NV12
<< QVideoFrame::Format_NV21
<< QVideoFrame::Format_IMC1
<< QVideoFrame::Format_IMC2
<< QVideoFrame::Format_IMC3
<< QVideoFrame::Format_IMC4
<< QVideoFrame::Format_Y8
<< QVideoFrame::Format_Y16
<< QVideoFrame::Format_Jpeg
<< QVideoFrame::Format_CameraRaw
<< QVideoFrame::Format_AdobeDng;
}


};

// Command line: extractframes format interval
// format:QString, 

Re: [Interest] How to have partially transparent widget on top that do not catch events

2018-06-13 Thread Igor Mironchik

Hi,

Why not to draw the same border but with Qt::transparent color?


On 13.06.2018 10:26, Nicolas Krieger wrote:


Hi,

I would like to have a border in my widget, just like a QFrame. But a 
QFrame which border is over and not beside. I want to hide and show 
the border, but without layout re-sizing effects.


There is an example in the attachment. There is a QFrame and under a 
QPushButton ("LOL"). This is two different layouts (one for the QFrame 
and one for the button) added in the same cell of a QGridLayout.


The other way of doing it would have been to add the button in the 
QFrame. But when the border is hidden, the button is resized. And I 
don't want to.


My problem is that with the solution of adding two widgets in the same 
cell of a QGridLayout, I can not use the "LOL" button. How can I do 
that. I would like to continue using a QFrame because of the border 
convenience.


--
*Nicolas Krieger*


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Building Qt 5.11.0 with -no-opengl

2018-06-11 Thread Igor Mironchik

Hello,

Is it possible to build Qt 5.11 with -no-opengl option?

I tried to do this and got:

g++ -c -pipe -g -Og -fPIC -std=c++1z -fvisibility=hidden 
-fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time 
-D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS 
-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_EXCEPTIONS 
-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_STATICPLUGIN -DQT_PLUGIN 
-DQT_SERVICE_SUPPORT_LIB -DQT_WAYLANDCLIENT_LIB -DQT_GUI_LIB 
-DQT_CORE_LIB -I. 
-I../../../../hardwareintegration/client/shm-emulation-server 
-I../../../../../include/QtWaylandClient/5.11.0 
-I../../../../../include/QtWaylandClient/5.11.0/QtWaylandClient 
-I/home/igor/Work/Qt/stable/qt-everywhere-src-5.11.0/qtbase/include 
-I/home/igor/Work/Qt/stable/qt-everywhere-src-5.11.0/qtbase/include/QtServiceSupport 
-I/home/igor/Work/Qt/stable/qt-everywhere-src-5.11.0/qtbase/include/QtServiceSupport/5.11.0 
-I/home/igor/Work/Qt/stable/qt-everywhere-src-5.11.0/qtbase/include/QtServiceSupport/5.11.0/QtServiceSupport 
-I/home/igor/Work/Qt/stable/qt-everywhere-src-5.11.0/qtbase/include/QtGui/5.11.0 
-I/home/igor/Work/Qt/stable/qt-everywhere-src-5.11.0/qtbase/include/QtGui/5.11.0/QtGui 
-I../../../../../include -I../../../../../include/QtWaylandClient 
-I/home/igor/Work/Qt/stable/qt-everywhere-src-5.11.0/qtbase/include/QtGui 
-I/home/igor/Work/Qt/stable/qt-everywhere-src-5.11.0/qtbase/include/QtCore/5.11.0 
-I/home/igor/Work/Qt/stable/qt-everywhere-src-5.11.0/qtbase/include/QtCore/5.11.0/QtCore 
-I/home/igor/Work/Qt/stable/qt-everywhere-src-5.11.0/qtbase/include/QtCore 
-I.moc 
-I/home/igor/Work/Qt/stable/qt-everywhere-src-5.11.0/qtbase/mkspecs/linux-g++ 
-o .obj/shmserverbufferintegration.o 
../../../../hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp
../../../../hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp: 
In function ‘QOpenGLTexture* createTextureFromShm(const QString&, int, 
int, int, int)’:
../../../../hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp:81:10: 
error: ‘QOpenGLContext’ has not been declared

 if (!QOpenGLContext::currentContext())
  ^
../../../../hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp:84:43: 
error: incomplete type ‘QOpenGLTexture’ used in nested name specifier
 auto *tex = new QOpenGLTexture(image, 
QOpenGLTexture::DontGenerateMipMaps);

   ^
../../../../hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp:84:78: 
error: invalid use of incomplete type ‘class QOpenGLTexture’
 auto *tex = new QOpenGLTexture(image, 
QOpenGLTexture::DontGenerateMipMaps);

^
In file included from 
../../../../../include/QtWaylandClient/5.11.0/QtWaylandClient/private/qwaylandserverbufferintegration_p.h:1:0,
 from 
../../../../hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.h:45,
 from 
../../../../hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp:40:
../../../../../include/QtWaylandClient/5.11.0/QtWaylandClient/private/../../../../../src/client/hardwareintegration/qwaylandserverbufferintegration_p.h:62:7: 
note: forward declaration of ‘class QOpenGLTexture’

 class QOpenGLTexture;
   ^
Makefile:1255: recipe for target '.obj/shmserverbufferintegration.o' failed

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Unable to run QtQuick TestCase from qrc resources

2018-04-25 Thread Igor Mironchik

Hi,

You are right too. This should be done too.


On 25.04.2018 17:59, Christoph Keller wrote:

You're right, that line looks wrong indeed.

I've got a Qt version to debug now. I don't come that for, already 
exists at the TestCaseCollector 
(https://github.com/qt/qtdeclarative/blob/5.11/src/qmltest/quicktest.cpp#L493).


Internally this creates QQmlComponent and I can reproduce the error with:

    QGuiApplication app(argc, argv);

    QFileInfo fileInfo(":/tst_TestItem.qml");

    QQmlEngine engine;
    QQmlComponent component(, fileInfo.absoluteFilePath());
    QList errors = component.errors();

    for(const QQmlError  : errors) {
    qWarning() << error.toString();
    }

    Q_ASSERT(errors.isEmpty());
fileIinfo.absoluteFilePath() resolves to ":/tst_TestItem.qml" which 
fails to load.


If manually changed to "qrc:/tst_TestItem.qml", it succeeds loading.

It seems the replacement from ":/" to "qrc:" like in the line you 
found needs to be applied in TestCaseCollector, too.


Christoph

On 25.04.18 16:08, Igor Mironchik wrote:


Hi,

if (path.startsWith(QLatin1String(":/")))
    view.setSource(QUrl(QLatin1String("qrc:") + path.midRef(2)));


Bug is here... path.midRef(1) should be

or

QLatin1String("qrc:/")


On 25.04.2018 16:16, Christoph Keller wrote:


They should, at least the source of the framework sets the path to 
":/" on Android: 
https://github.com/qt/qtdeclarative/blob/5.11/src/qmltest/quicktest.cpp#L422


The same applies for the sourcePath property on all platforms: 
https://github.com/qt/qtdeclarative/blob/5.11/src/qmltest/quicktest.cpp#L536


My tst_TestItem.qml is loaded, but it can't find the normal QtQuick 
Item it should test.


Christoph


On 25.04.18 14:41, Igor Mironchik wrote:


Hi,


On 25.04.2018 15:19, Igor Mironchik wrote:


Hi,

Try qrc:/ as prefix...



Will not work too... Does qrc:/ supported by Qt Quick Test at all? 
Seems that no...




On 25.04.2018 13:53, Christoph Keller wrote:


Hello,

is there a way to run the QtQuick TestCases from qrc resources? 
Running them from the file system works as as expected but 
setting the source path to ":/" leads to the TestCase being 
loaded but it cannot find other imports (in the same directory).


I've attached an example which always outputs:

file::/tst_TestItem.qml:4:1: TestItem is not a type

TestItem {

^

Christoph



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest






___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest




___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest




___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest




___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Unable to run QtQuick TestCase from qrc resources

2018-04-25 Thread Igor Mironchik

Hi,

if (path.startsWith(QLatin1String(":/")))
    view.setSource(QUrl(QLatin1String("qrc:") + path.midRef(2)));


Bug is here... path.midRef(1) should be

or

QLatin1String("qrc:/")


On 25.04.2018 16:16, Christoph Keller wrote:


They should, at least the source of the framework sets the path to 
":/" on Android: 
https://github.com/qt/qtdeclarative/blob/5.11/src/qmltest/quicktest.cpp#L422


The same applies for the sourcePath property on all platforms: 
https://github.com/qt/qtdeclarative/blob/5.11/src/qmltest/quicktest.cpp#L536


My tst_TestItem.qml is loaded, but it can't find the normal QtQuick 
Item it should test.


Christoph


On 25.04.18 14:41, Igor Mironchik wrote:


Hi,


On 25.04.2018 15:19, Igor Mironchik wrote:


Hi,

Try qrc:/ as prefix...



Will not work too... Does qrc:/ supported by Qt Quick Test at all? 
Seems that no...




On 25.04.2018 13:53, Christoph Keller wrote:


Hello,

is there a way to run the QtQuick TestCases from qrc resources? 
Running them from the file system works as as expected but setting 
the source path to ":/" leads to the TestCase being loaded but it 
cannot find other imports (in the same directory).


I've attached an example which always outputs:

file::/tst_TestItem.qml:4:1: TestItem is not a type

TestItem {

^

Christoph



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest






___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest




___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Unable to run QtQuick TestCase from qrc resources

2018-04-25 Thread Igor Mironchik

Hi,


On 25.04.2018 15:19, Igor Mironchik wrote:


Hi,

Try qrc:/ as prefix...



Will not work too... Does qrc:/ supported by Qt Quick Test at all? Seems 
that no...




On 25.04.2018 13:53, Christoph Keller wrote:


Hello,

is there a way to run the QtQuick TestCases from qrc resources? 
Running them from the file system works as as expected but setting 
the source path to ":/" leads to the TestCase being loaded but it 
cannot find other imports (in the same directory).


I've attached an example which always outputs:

file::/tst_TestItem.qml:4:1: TestItem is not a type

TestItem {

^

Christoph



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest




___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Unable to run QtQuick TestCase from qrc resources

2018-04-25 Thread Igor Mironchik

Hi,

Try qrc:/ as prefix...


On 25.04.2018 13:53, Christoph Keller wrote:


Hello,

is there a way to run the QtQuick TestCases from qrc resources? 
Running them from the file system works as as expected but setting the 
source path to ":/" leads to the TestCase being loaded but it cannot 
find other imports (in the same directory).


I've attached an example which always outputs:

file::/tst_TestItem.qml:4:1: TestItem is not a type

TestItem {

^

Christoph



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] resizable QTextEdit

2018-04-15 Thread Igor Mironchik

Hi,


On 15.04.2018 19:30, Alexander Semke wrote:

Hi Igor,


As a possible solution:
[...]

Works now.  I pushed a modified version of your code to our repository in
https://cgit.kde.org/labplot.git/commit/?
id=1cacf9f095b5e850baa58584b071986fbfe790fb


The only problem now is that the entered text is not shown in TextEdit with
this new class. The text changes are accepted, but nothing is shown. Any idea
here?


The problem was in Text::resizeEvent(). I forgot to invoke base 
implementation, i.e. QTextEdit::resizeEvent().



Regards,
Alexander


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] resizable QTextEdit

2018-04-15 Thread Igor Mironchik

Hi,


#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 


class Resizable {
public:
    Resizable()
    {
    }

    virtual ~Resizable()
    {
    }

    virtual void addSize( const QSize & size ) = 0;

protected:
    QSize m_size;
};

class Corner
    :    public QWidget
{
public:
    Corner( Resizable * resizable, QWidget * parent )
        :    QWidget( parent )
        ,    m_toResize( resizable )
        ,    m_pressed( false )
    {
        resize( sizeHint() );
    }

    virtual ~Corner()
    {
    }

    QSize sizeHint() const Q_DECL_OVERRIDE
    {
        return QSize( 10, 10 );
    }

protected:
    void paintEvent( QPaintEvent * ) Q_DECL_OVERRIDE
    {
        QPainter p( this );
        p.setPen( Qt::red );
        p.setBrush( Qt::red );

        p.drawRect( rect() );
    }

    void mousePressEvent( QMouseEvent * e ) Q_DECL_OVERRIDE
    {
        if( e->button() == Qt::LeftButton )
        {
            m_pos = e->pos();
            m_pressed = true;
        }

        e->accept();
    }

    void mouseReleaseEvent( QMouseEvent * e ) Q_DECL_OVERRIDE
    {
        if( e->button() == Qt::LeftButton )
            m_pressed = false;

        e->accept();
    }

    void mouseMoveEvent( QMouseEvent * e ) Q_DECL_OVERRIDE
    {
        if( m_pressed )
        {
            const QPoint delta = e->pos() - m_pos;

            m_toResize->addSize( QSize( delta.x(), delta.y() ) );
        }

        e->accept();
    }

private:
    Resizable * m_toResize;
    QPoint m_pos;
    bool m_pressed;
};

class Text
    :    public QTextEdit
    ,    public Resizable
{
public:
    Text( QWidget * parent )
        :    QTextEdit( parent )
        ,    m_corner( new Corner( this, this ) )
        ,    m_size( QTextEdit::sizeHint() )
    {
        m_corner->move( width() - m_corner->width(),
            height() - m_corner->height() );
    }

    virtual ~Text()
    {
    }

    void addSize( const QSize & size ) Q_DECL_OVERRIDE
    {
        setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );

        m_size += size;

        updateGeometry();
    }

    QSize sizeHint() const Q_DECL_OVERRIDE
    {
        return m_size;
    }

protected:
    void resizeEvent( QResizeEvent * e ) Q_DECL_OVERRIDE
    {
        QTextEdit::resizeEvent( e );

        m_corner->move( e->size().width() - m_corner->width(),
            e->size().height() - m_corner->height() );

        m_size = e->size();

        e->accept();
    }

private:
    Corner * m_corner;
    QSize m_size;
};


class Form
    :    public QWidget
{
public:
    Form()
    {
        QVBoxLayout * v = new QVBoxLayout( this );
        QFrame * f = new QFrame( this );
        f->setFrameStyle( QFrame::Panel | QFrame::Sunken );
        QHBoxLayout * h = new QHBoxLayout( f );
        v->addWidget( f );
        QLabel * label = new QLabel( "Resizable Text Field", f );
        label->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
        h->addWidget( label );
        Text * text = new Text( f );
        h->addWidget( text );
        QSpacerItem * s = new QSpacerItem( 10, 10, QSizePolicy::Fixed,
            QSizePolicy::Expanding );
        v->addItem( s );

        resize( 800, 800 );
    }

    virtual ~Form()
    {
    }
};

int main( int argc, char ** argv )
{
    QApplication app( argc, argv );

    Form f;
    f.show();

    return app.exec();
}


On 15.04.2018 19:30, Alexander Semke wrote:

Hi Igor,


As a possible solution:
[...]

Works now.  I pushed a modified version of your code to our repository in
https://cgit.kde.org/labplot.git/commit/?
id=1cacf9f095b5e850baa58584b071986fbfe790fb


The only problem now is that the entered text is not shown in TextEdit with
this new class. The text changes are accepted, but nothing is shown. Any idea
here?


Regards,
Alexander


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] resizable QTextEdit

2018-04-15 Thread Igor Mironchik

Hi again,

If you want to be able to shrink the width too, you can do something 
similar to:



#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 


class Text;

class Corner
    :    public QWidget
{
public:
    Corner( Text * parent );

    virtual ~Corner();

    QSize sizeHint() const Q_DECL_OVERRIDE;

protected:
    void paintEvent( QPaintEvent * ) Q_DECL_OVERRIDE;

    void mousePressEvent( QMouseEvent * e ) Q_DECL_OVERRIDE;

    void mouseReleaseEvent( QMouseEvent * e ) Q_DECL_OVERRIDE;

    void mouseMoveEvent( QMouseEvent * e ) Q_DECL_OVERRIDE;

private:
    Text * m_toResize;
    QPoint m_pos;
    bool m_pressed;
};

class Text
    :    public QTextEdit
{
public:
    Text( QWidget * parent, QLayout * layout );

    virtual ~Text();

    void addSize( const QSize & size );

    QSize sizeHint() const Q_DECL_OVERRIDE;

protected:
    void resizeEvent( QResizeEvent * e ) Q_DECL_OVERRIDE;

private:
    Corner * m_corner;
    QSize m_size;
    QLayout * m_layout;
};

Corner::Corner( Text * parent )
    :    QWidget( parent )
    ,    m_toResize( parent )
    ,    m_pressed( false )
{
}

Corner::~Corner()
{
}

QSize
Corner::sizeHint() const
{
    return QSize( 10, 10 );
}

void
Corner::paintEvent( QPaintEvent * )
{
    QPainter p( this );
    p.setPen( Qt::red );
    p.setBrush( Qt::red );

    p.drawRect( rect() );
}

void
Corner::mousePressEvent( QMouseEvent * e )
{
    if( e->button() == Qt::LeftButton )
    {
        m_pos = e->pos();
        m_pressed = true;
    }

    e->accept();
}

void
Corner::mouseReleaseEvent( QMouseEvent * e )
{
    if( e->button() == Qt::LeftButton )
        m_pressed = false;

    e->accept();
}

void
Corner::mouseMoveEvent( QMouseEvent * e )
{
    if( m_pressed )
    {
        const QPoint delta = e->pos() - m_pos;

        m_toResize->addSize( QSize( delta.x(), delta.y() ) );
    }

    e->accept();
}

Text::Text( QWidget * parent, QLayout * layout )
    :    QTextEdit( parent )
    ,    m_corner( new Corner( this ) )
    ,    m_size( QTextEdit::sizeHint() )
    ,    m_layout( layout )
{
    m_corner->move( width() - m_corner->width(),
        height() - m_corner->height() );
}

Text::~Text()
{
}

void
Text::addSize( const QSize & size )
{
    setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );

    m_size = QSize( m_size.width() + size.width(), m_size.height() + 
size.height() );


    updateGeometry();
}

QSize
Text::sizeHint() const
{
    return m_size;
}

void
Text::resizeEvent( QResizeEvent * e )
{
    m_corner->move( e->size().width() - m_corner->width(),
        e->size().height() - m_corner->height() );

    m_size = e->size();

    e->accept();
}


class Form
    :    public QWidget
{
public:
    Form()
    {
        QVBoxLayout * v = new QVBoxLayout( this );
        QFrame * f = new QFrame( this );
        f->setFrameStyle( QFrame::Panel | QFrame::Sunken );
        QHBoxLayout * h = new QHBoxLayout( f );
        v->addWidget( f );
        QLabel * label = new QLabel( "Resizeable Text Field", f );
        label->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
        h->addWidget( label );
        Text * text = new Text( f, v );
        h->addWidget( text );
        QSpacerItem * s = new QSpacerItem( 10, 10, QSizePolicy::Fixed,
            QSizePolicy::Expanding );
        v->addItem( s );

        resize( 800, 800 );
    }

    virtual ~Form()
    {
    }
};

int main( int argc, char ** argv )
{
    QApplication app( argc, argv );

    Form f;
    f.show();

    return app.exec();
}


On 15.04.2018 11:53, Alexander Semke wrote:

On Freitag, 13. April 2018 10:22:14 CEST Igor Mironchik wrote:

Something like this?
[...]

Thanks Igor, I've got the idea. The resize works fine now but I have the
problem with the layout of the parent widget being not updated. My text edit
widget is embedded into a QFrame with a vertical layout. After the manual
resize I need the layout(s) and the sizes/positions of this frame and of all
the other widgets frame's parent to be adjusted to the new size of the text
edit.

https://imgur.com/a/eV2Fj - here the height of the text edit widget was made
smaller but the QFrame widget where the text edit is placed in a vertical
layout was not resized. I'm calling frame->layout()->activate() to trigger the
recalculation but this doesn't lead to the desired effect...  Do I new to
resize the frame widget here manually or are there any other methods to
update/recalculate the layout?




___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] resizable QTextEdit

2018-04-15 Thread Igor Mironchik

Hi,

As a possible solution:


#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 


class Text;

class Corner
    :    public QWidget
{
public:
    Corner( Text * parent );

    virtual ~Corner();

    QSize sizeHint() const Q_DECL_OVERRIDE;

protected:
    void paintEvent( QPaintEvent * ) Q_DECL_OVERRIDE;

    void mousePressEvent( QMouseEvent * e ) Q_DECL_OVERRIDE;

    void mouseReleaseEvent( QMouseEvent * e ) Q_DECL_OVERRIDE;

    void mouseMoveEvent( QMouseEvent * e ) Q_DECL_OVERRIDE;

private:
    Text * m_toResize;
    QPoint m_pos;
    bool m_pressed;
};

class Text
    :    public QTextEdit
{
public:
    Text( QWidget * parent, QLayout * layout );

    virtual ~Text();

    void addSize( const QSize & size );

    QSize sizeHint() const Q_DECL_OVERRIDE;

protected:
    void resizeEvent( QResizeEvent * e ) Q_DECL_OVERRIDE;

private:
    Corner * m_corner;
    QSize m_size;
    QLayout * m_layout;
};

Corner::Corner( Text * parent )
    :    QWidget( parent )
    ,    m_toResize( parent )
    ,    m_pressed( false )
{
}

Corner::~Corner()
{
}

QSize
Corner::sizeHint() const
{
    return QSize( 10, 10 );
}

void
Corner::paintEvent( QPaintEvent * )
{
    QPainter p( this );
    p.setPen( Qt::red );
    p.setBrush( Qt::red );

    p.drawRect( rect() );
}

void
Corner::mousePressEvent( QMouseEvent * e )
{
    if( e->button() == Qt::LeftButton )
    {
        m_pos = e->pos();
        m_pressed = true;
    }

    e->accept();
}

void
Corner::mouseReleaseEvent( QMouseEvent * e )
{
    if( e->button() == Qt::LeftButton )
        m_pressed = false;

    e->accept();
}

void
Corner::mouseMoveEvent( QMouseEvent * e )
{
    if( m_pressed )
    {
        const QPoint delta = e->pos() - m_pos;

        m_toResize->addSize( QSize( delta.x(), delta.y() ) );
    }

    e->accept();
}

Text::Text( QWidget * parent, QLayout * layout )
    :    QTextEdit( parent )
    ,    m_corner( new Corner( this ) )
    ,    m_size( QTextEdit::sizeHint() )
    ,    m_layout( layout )
{
    m_corner->move( width() - m_corner->width(),
        height() - m_corner->height() );
}

Text::~Text()
{
}

void
Text::addSize( const QSize & size )
{
    setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );

    m_size = QSize( m_size.width(), m_size.height() + size.height() );

    updateGeometry();
}

QSize
Text::sizeHint() const
{
    return m_size;
}

void
Text::resizeEvent( QResizeEvent * e )
{
    m_corner->move( e->size().width() - m_corner->width(),
        e->size().height() - m_corner->height() );

    m_size = e->size();

    e->accept();
}


class Form
    :    public QWidget
{
public:
    Form()
    {
        QVBoxLayout * v = new QVBoxLayout( this );
        QFrame * f = new QFrame( this );
        f->setFrameStyle( QFrame::Panel | QFrame::Sunken );
        QHBoxLayout * h = new QHBoxLayout( f );
        v->addWidget( f );
        QLabel * label = new QLabel( "Resizeable Text Field", f );
        h->addWidget( label );
        Text * text = new Text( f, v );
        h->addWidget( text );
        QSpacerItem * s = new QSpacerItem( 10, 10, QSizePolicy::Fixed,
            QSizePolicy::Expanding );
        v->addItem( s );

        resize( 800, 800 );
    }

    virtual ~Form()
    {
    }
};

int main( int argc, char ** argv )
{
    QApplication app( argc, argv );

    Form f;
    f.show();

    return app.exec();
}


On 15.04.2018 11:53, Alexander Semke wrote:

On Freitag, 13. April 2018 10:22:14 CEST Igor Mironchik wrote:

Something like this?
[...]

Thanks Igor, I've got the idea. The resize works fine now but I have the
problem with the layout of the parent widget being not updated. My text edit
widget is embedded into a QFrame with a vertical layout. After the manual
resize I need the layout(s) and the sizes/positions of this frame and of all
the other widgets frame's parent to be adjusted to the new size of the text
edit.

https://imgur.com/a/eV2Fj - here the height of the text edit widget was made
smaller but the QFrame widget where the text edit is placed in a vertical
layout was not resized. I'm calling frame->layout()->activate() to trigger the
recalculation but this doesn't lead to the desired effect...  Do I new to
resize the frame widget here manually or are there any other methods to
update/recalculate the layout?




___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] resizable QTextEdit

2018-04-13 Thread Igor Mironchik

Hi,

Something like this?


#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

class Text;

class Corner
    :    public QWidget
{
public:
     Corner( QWidget * parent )
        :    QWidget( parent )
        ,    m_toResize( parent )
        ,    m_pressed( false )
    {
    }

    virtual ~Corner()
    {
    }

    QSize sizeHint() const Q_DECL_OVERRIDE
    {
        return QSize( 10, 10 );
    }

protected:
    void paintEvent( QPaintEvent * ) Q_DECL_OVERRIDE
    {
        QPainter p( this );
        p.setPen( Qt::red );
        p.setBrush( Qt::red );

        p.drawRect( rect() );
    }

    void mousePressEvent( QMouseEvent * e ) Q_DECL_OVERRIDE
    {
        if( e->button() == Qt::LeftButton )
        {
            m_pos = e->pos();
            m_pressed = true;
        }

        e->accept();
    }

    void mouseReleaseEvent( QMouseEvent * e ) Q_DECL_OVERRIDE
    {
        if( e->button() == Qt::LeftButton )
            m_pressed = false;

        e->accept();
    }

    void mouseMoveEvent( QMouseEvent * e ) Q_DECL_OVERRIDE
    {
        if( m_pressed )
        {
            const QPoint delta = e->pos() - m_pos;

            m_toResize->resize( m_toResize->size() + QSize( delta.x(), 
delta.y() ) );

        }

        e->accept();
    }

private:
    QWidget * m_toResize;
    QPoint m_pos;
    bool m_pressed;
};

class Text
    :    public QTextEdit
{
public:
    Text( QWidget * parent )
        :    QTextEdit( parent )
        ,    m_corner( new Corner( this ) )
    {
        m_corner->move( width() - m_corner->width(),
            height() - m_corner->height() );
    }

    virtual ~Text()
    {
    }

protected:
    void resizeEvent( QResizeEvent * e ) Q_DECL_OVERRIDE
    {
        m_corner->move( width() - m_corner->width(),
            height() - m_corner->height() );

        e->accept();
    }

private:
    Corner * m_corner;
};

class Form
    :    public QWidget
{
public:
    Form()
    {
        QVBoxLayout * v = new QVBoxLayout( this );
        QHBoxLayout * h = new QHBoxLayout;
        v->addLayout( h );
        QLabel * label = new QLabel( "Resizeable Text Field", this );
        h->addWidget( label );
        Text * text = new Text( this );
        h->addWidget( text );
        QSpacerItem * s = new QSpacerItem( 10, 10, QSizePolicy::Fixed,
            QSizePolicy::Expanding );
        v->addItem( s );

        resize( 800, 800 );
    }

    virtual ~Form()
    {
    }
};

int main( int argc, char ** argv )
{
    QApplication app( argc, argv );

    Form f;
    f.show();

    return app.exec();
}


On 13.04.2018 10:34, Alexander Semke wrote:

Hi,

one frequently sees form text fields on the web where the actual text field can
be resized by the user by clicking on the resize-symbol in the corner of the
text field and dragging it until the desired size is achieved. I'm wondering
how to get this for a QTextEdit  placed in a layout. Does somebody have an
idea here?


Thanks and Regards,
Alexander


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] How to scroll QScrollArea by number of pixels?

2018-04-11 Thread Igor Mironchik

Hello,

[virtual protected ] void scrollContentsBy(int dx, int dy)


On 11.04.2018 08:31, Patrick Stinson wrote:

Hello!

Is there a way to scroll a QScrollArea by a precise number of pixels on the 
viewport widget? Or do you have to use relative units as calculated by the size 
fo the scrollbar handle and slider zone of the scroll bar?

Thanks!
-Patrick


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] How to programatically make a tab's text bold?

2018-04-04 Thread Igor Mironchik


#include 
#include 
#include 
#include 
#include 
#include 

class Style : public QProxyStyle
{
public:
    Style( QTabBar * bar )
        :    m_boldTab( 0 )
        ,    m_bar( bar )
    {
    }

    ~Style()
    {
    }

    void drawControl( ControlElement element,
        const QStyleOption *option,
        QPainter *painter,
        const QWidget *widget = Q_NULLPTR) const
    {
        if( element == QStyle::CE_TabBarTab )
        {
            if( m_bar->tabAt( option->rect.center() ) == m_boldTab )
            {
                QFont font = widget->font();
                font.setBold( true );

                painter->save();
                painter->setFont( font );
                QProxyStyle::drawControl( element, option, painter, 
widget );

                painter->restore();
            }
            else
                QProxyStyle::drawControl( element, option, painter, 
widget );

        }
        else
            QProxyStyle::drawControl( element, option, painter, widget );
    }

private:
    int m_boldTab;
    QTabBar * m_bar;
};

class Tab : public QTabBar
{
public:
    Tab( QWidget * parent )
        :    QTabBar( parent )
        ,    m_boldTab( 0 )
    {
    }

    ~Tab()
    {
    }

protected:
    QSize tabSizeHint(int index) const
    {
        if( index == m_boldTab )
        {
            const QSize s = QTabBar::tabSizeHint( index );
            const QFontMetrics fm( font() );
            const int w = fm.width( tabText( index ) );

            QFont f = font();
            f.setBold( true );
            const QFontMetrics bfm( f );

            const int bw = bfm.width( tabText( index ) );

            return QSize( s.width() - w + bw, s.height() );
        }
        else
            return QTabBar::tabSizeHint( index );
    }

private:
    int m_boldTab;
};

class TabWidget
    :    public QTabWidget
{
public:
    TabWidget()
        :    m_tabBar( new Tab( this ) )
        ,    m_style( m_tabBar )
    {
        m_tabBar->setStyle( _style );
        setTabBar( m_tabBar );
    }

    ~TabWidget()
    {
    }

private:
    Tab * m_tabBar;
    Style m_style;
};

int main( int argc, char ** argv )
{
    QApplication app( argc, argv );

    TabWidget t;
    QWidget w1, w2;
    t.addTab( , "Test Tab With Long Name" );
    t.addTab( , "Second Tab" );

    t.show();

    return app.exec();
}


On 04.04.2018 10:47, Vadim Peretokin wrote:


On Wed, Apr 4, 2018 at 7:35 AM Hamish Moffatt 
> wrote:


On 04/04/18 15:10, Vadim Peretokin wrote:
> How can I programatically make a tab's text bold? I'm looking to
> notify the user that they need to look at it.
>
> Note that this is different from using a stylesheet to set the
> selected tab bold - I'd like to set any random tab's text bold.
>
> Been looking at this for several days, appreciate any advice!

Using widgets? You didn't say what context.

Maybe you can set a dynamic property on the tab when you want it to be
bold, and attach a special style using properties in the stylesheet.


Hamish
___
Interest mailing list
Interest@qt-project.org 
http://lists.qt-project.org/mailman/listinfo/interest


Yes, using widgets.

I've tried a dynamic property however as far as I can see, I can only 
set the dynamic property on the entire tab bar - not a specific tab. 
How can I set it on a specific tab?



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Rotating leaves

2018-04-01 Thread Igor Mironchik

Hi,


On 01.04.2018 23:56, Bin Chen wrote:

Hi, Igor,

1. plainAngle is between 0~180, you want to know when you need to 
invert it?
    I assumed m_transform is for leaf, then swap branch and leaf in 
QVector3D::crossProduct.

    No need lessZero() function.


Big thanks. Great, swapping helped. So the rule is when you need to 
rotate something around some axis then first argument of 
QVector3D::crossProduct and QVector3D::dotProduct should be that vector 
that should be rotated?




2. In this case, be careful when branch and leaf are in the same line 
(same or opposite directions)  , crossProduct produces null vector3d.


Regards,

Bin


On 1 Apr 2018, at 8:56 pm, Igor Mironchik <igor.mironc...@gmail.com 
<mailto:igor.mironc...@gmail.com>> wrote:


Hi,

Sure, I know this...

const QVector3D branch(...);
const QVector3D leaf( 0.0f, 1.0f, 0.0f );
const QVector3D axis = QVector3D::crossProduct( branch, leaf );
const float cosPlainAngle = QVector3D::dotProduct( branch, leaf );
const float plainAngle = qRadiansToDegrees( std::acos( cosPlainAngle ) );
const QQuaternion quat = Qt3DCore::QTransform::fromAxisAndAngle( 
axis, plainAngle );

m_transform->setRotation( quat );

But in a view of Qt 3D this is only a half of the solution. In a half 
of cases this works, but in another cases I need -plainAngle.


So at this point I found the next solution:

static inline bool lessZero( const QVector3D & v )
{
    return ( v.x() < 0.0f || v.y() < 0.0f || v.z() < 0.0f );
}

if( lessZero( branch ) )
        plainAngle = -plainAngle;

So I actually asked not for the math as it is but for checking of my 
solution for correctness.


On 01.04.2018 12:48, Konstantin Shegunov wrote:

Hi Igor,
What Bin Chen wrote is probably the most painless way of achieving 
what you want. If you are however interested in the math, here goes 
my stab:
If I understand you correctly, you know the leaf normal, and the 
branch direction vector, then you're searching for the matrix that 
transforms the former to the latter.
Basically you need to find the matrix that satisfies: b = A  * n (b 
is the branch direction, n is the leaf normal).
This equation however is underdetemined, meaning you can have 
several rotations done in sequence that give you the same result, so 
you'd need to do some "trickery". One of the usual ways to solve 
such a problem is to use Euler angles[1], where the idea is to make 
elemental rotations with respect to the principle axes of the 
(global) coordinate systems. To that end you'd need to calculate the 
projections (i.e. dot products) of b and n to the principal axes and 
extract the angles of rotation from there, then construct each 
rotation matrix around a principal axis of the coordinate system and 
finally multiply them to obtain the final transformation.


[1]: https://en.wikipedia.org/wiki/Euler_angles 
<https://urldefense.proofpoint.com/v2/url?u=https-3A__en.wikipedia.org_wiki_Euler-5Fangles=DwMDaQ=-0XTxx5JZxtPyuSXdvX8qQ=_JxpcpJpSMrVwuVMK05qMw=JDoIqjY-zYljVJcp8DYX1co3l1ElN2hO1_68-23VIAU=tezn68iaGXO6oGne6GHcWtS-CoDkU-Uj0fztStttyik=>


I hope that helps.
Konstantin.


___
Interest mailing list
Interest@qt-project.org <mailto:Interest@qt-project.org>
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.qt-2Dproject.org_mailman_listinfo_interest=DwICAg=-0XTxx5JZxtPyuSXdvX8qQ=_JxpcpJpSMrVwuVMK05qMw=JDoIqjY-zYljVJcp8DYX1co3l1ElN2hO1_68-23VIAU=iR7_jc5oqZY41bU9FD_ergWeOPoFC0aUG4SyhsDkHIY=


Confidentiality Notice: This message (including attachments) is a 
private communication solely for use of the intended recipient(s). If 
you are not the intended recipient(s) or believe you received this 
message in error, notify the sender immediately and then delete this 
message. Any other use, retention, dissemination or copying is 
prohibited and may be a violation of law, including the Electronic 
Communication Privacy Act of 1986.   ­­ 


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Rotating leaves

2018-04-01 Thread Igor Mironchik

Hi,

Sure, I know this...

const QVector3D branch(...);
const QVector3D leaf( 0.0f, 1.0f, 0.0f );
const QVector3D axis = QVector3D::crossProduct( branch, leaf );
const float cosPlainAngle = QVector3D::dotProduct( branch, leaf );
const float plainAngle = qRadiansToDegrees( std::acos( cosPlainAngle ) );
const QQuaternion quat = Qt3DCore::QTransform::fromAxisAndAngle( axis, 
plainAngle );

m_transform->setRotation( quat );

But in a view of Qt 3D this is only a half of the solution. In a half of 
cases this works, but in another cases I need -plainAngle.


So at this point I found the next solution:

static inline bool lessZero( const QVector3D & v )
{
    return ( v.x() < 0.0f || v.y() < 0.0f || v.z() < 0.0f );
}

if( lessZero( branch ) )
        plainAngle = -plainAngle;

So I actually asked not for the math as it is but for checking of my 
solution for correctness.


On 01.04.2018 12:48, Konstantin Shegunov wrote:

Hi Igor,
What Bin Chen wrote is probably the most painless way of achieving 
what you want. If you are however interested in the math, here goes my 
stab:
If I understand you correctly, you know the leaf normal, and the 
branch direction vector, then you're searching for the matrix that 
transforms the former to the latter.
Basically you need to find the matrix that satisfies: b = A  * n (b is 
the branch direction, n is the leaf normal).
This equation however is underdetemined, meaning you can have several 
rotations done in sequence that give you the same result, so you'd 
need to do some "trickery". One of the usual ways to solve such a 
problem is to use Euler angles[1], where the idea is to make elemental 
rotations with respect to the principle axes of the (global) 
coordinate systems. To that end you'd need to calculate the 
projections (i.e. dot products) of b and n to the principal axes and 
extract the angles of rotation from there, then construct each 
rotation matrix around a principal axis of the coordinate system and 
finally multiply them to obtain the final transformation.


[1]: https://en.wikipedia.org/wiki/Euler_angles 



I hope that helps.
Konstantin.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Fwd: Re: [Development] qDebug()

2018-03-26 Thread Igor Mironchik




 Forwarded Message 
Subject:Re: [Development] qDebug()
Date:   Mon, 26 Mar 2018 09:18:39 +0300
From:   Igor Mironchik <igor.mironc...@gmail.com>
To: 	Mitch Curtis <mitch.cur...@qt.io>, developm...@qt-project.org 
<developm...@qt-project.org>




Yes, it helped, thanks.


On 26.03.2018 09:15, Mitch Curtis wrote:

You might be running into https://bugreports.qt.io/browse/QTBUG-66153

Try setting QT_LOGGING_TO_CONSOLE=1

On 3/26/18, 6:08 AM, "Development on behalf of Igor Mironchik" 
<development-bounces+mitch.curtis=qt...@qt-project.org on behalf of 
igor.mironc...@gmail.com> wrote:

 Hello,
 
 Built sources from git repository (5.11 branch) doesn't print qDebug()

 messages to console. What I missed during the configuration process?
 
 Thank you.
 
 ___

 Development mailing list
 developm...@qt-project.org
 http://lists.qt-project.org/mailman/listinfo/development
 



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Development] qDebug()

2018-03-25 Thread Igor Mironchik

Simple:

#include  #include  #include  #include 
 #include  class Obj     :    public QWidget {     
Q_OBJECT public:     Obj()     {}     ~Obj()     {} public slots:     
void start()     {         show();         QTextStream st( stdout );     
    st << "QTextStream works...";         qDebug() << "Started and 
stopped.";     } }; int main( int argc, char ** argv ) {     
QApplication app( argc, argv );     Obj o;     QTimer::singleShot( 0, 
, ::start );     return app.exec(); } #include "main.moc"


Produces:

Starting /home/igor/Tmp/build-debug-Qt_5_10_0_qt5-Debug/debug...

QTextStream works...

/home/igor/Tmp/build-debug-Qt_5_10_0_qt5-Debug/debug exited with code 0


But it's so only with Qt built from sources (5.11 branch)...

On 26.03.2018 08:50, Timur Pocheptsov wrote:


Have you tried creating an empty qtlogging.ini (as suggested on 
stackowerflow)?


Best regards,

    Timur.


*From:* Development 
<development-bounces+timur.pocheptsov=qt...@qt-project.org> on behalf 
of Igor Mironchik <igor.mironc...@gmail.com>

*Sent:* Monday, March 26, 2018 7:02:28 AM
*To:* Alexander Akulich; interest@qt-project.org
*Cc:* developm...@qt-project.org
*Subject:* Re: [Development] qDebug()


On 26.03.2018 07:50, Alexander Akulich wrote:

Hello Igor,

Does the linked solution help? See also comment #2 at 
https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1731646 
<https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1731646> 
(referenced in the stackoverflow answer).


No, this solution didn't help. I guess that there is another reason.



(The subject question belongs to interest@, not development@. Please 
drop developm...@qt-project.org <mailto:developm...@qt-project.org> 
in further replies).


On Mon, Mar 26, 2018 at 7:36 AM, Igor Mironchik 
<igor.mironc...@gmail.com <mailto:igor.mironc...@gmail.com>> wrote:


Hi,


On 26.03.2018 07:33, Timur Pocheptsov wrote:


On which platform is it? Are you sure it's 5.11 only?



I'm on Kubuntu 16.04. It is on 5.10 and 5.11 build from sources
by myself.


See, for example, the solution proposed here:


https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu

<https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu>


<https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu>

QT qDebug() stopped to work (no more printing to console ...

<https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu>
stackoverflow.com <http://stackoverflow.com>
After upgrading from Ubuntu 17.04 to 17.10, the QT qDebug()
macro stopped working and no longer displays the messages on the
console. How can the debug output be re ...

Best regards,

    Timur.


*From:* Development
<development-bounces+timur.pocheptsov=qt...@qt-project.org>
<mailto:development-bounces+timur.pocheptsov=qt...@qt-project.org>
on behalf of Igor Mironchik <igor.mironc...@gmail.com>
<mailto:igor.mironc...@gmail.com>
*Sent:* Monday, March 26, 2018 6:07:25 AM
*To:* developm...@qt-project.org <mailto:developm...@qt-project.org>
*Subject:* [Development] qDebug()
Hello,

Built sources from git repository (5.11 branch) doesn't print
qDebug()
messages to console. What I missed during the configuration process?

Thank you.

___
Development mailing list
developm...@qt-project.org <mailto:developm...@qt-project.org>
http://lists.qt-project.org/mailman/listinfo/development
<http://lists.qt-project.org/mailman/listinfo/development>



___
Development mailing list
developm...@qt-project.org <mailto:developm...@qt-project.org>
http://lists.qt-project.org/mailman/listinfo/development
<http://lists.qt-project.org/mailman/listinfo/development>






___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Development] qDebug()

2018-03-25 Thread Igor Mironchik



On 26.03.2018 08:50, Timur Pocheptsov wrote:


Have you tried creating an empty qtlogging.ini (as suggested on 
stackowerflow)?




Sure.



Best regards,

    Timur.


*From:* Development 
<development-bounces+timur.pocheptsov=qt...@qt-project.org> on behalf 
of Igor Mironchik <igor.mironc...@gmail.com>

*Sent:* Monday, March 26, 2018 7:02:28 AM
*To:* Alexander Akulich; interest@qt-project.org
*Cc:* developm...@qt-project.org
*Subject:* Re: [Development] qDebug()



On 26.03.2018 07:50, Alexander Akulich wrote:

Hello Igor,

Does the linked solution help? See also comment #2 at 
https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1731646 
<https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1731646> 
(referenced in the stackoverflow answer).


No, this solution didn't help. I guess that there is another reason.



(The subject question belongs to interest@, not development@. Please 
drop developm...@qt-project.org <mailto:developm...@qt-project.org> 
in further replies).


On Mon, Mar 26, 2018 at 7:36 AM, Igor Mironchik 
<igor.mironc...@gmail.com <mailto:igor.mironc...@gmail.com>> wrote:


Hi,


On 26.03.2018 07:33, Timur Pocheptsov wrote:


On which platform is it? Are you sure it's 5.11 only?



I'm on Kubuntu 16.04. It is on 5.10 and 5.11 build from sources
by myself.



See, for example, the solution proposed here:



https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu

<https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu>


<https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu>

QT qDebug() stopped to work (no more printing to console ...

<https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu>
stackoverflow.com <http://stackoverflow.com>
After upgrading from Ubuntu 17.04 to 17.10, the QT qDebug()
macro stopped working and no longer displays the messages on the
console. How can the debug output be re ...

Best regards,

Timur.


*From:* Development
<development-bounces+timur.pocheptsov=qt...@qt-project.org>
<mailto:development-bounces+timur.pocheptsov=qt...@qt-project.org>
on behalf of Igor Mironchik <igor.mironc...@gmail.com>
<mailto:igor.mironc...@gmail.com>
*Sent:* Monday, March 26, 2018 6:07:25 AM
*To:* developm...@qt-project.org <mailto:developm...@qt-project.org>
*Subject:* [Development] qDebug()
Hello,

Built sources from git repository (5.11 branch) doesn't print
qDebug()
messages to console. What I missed during the configuration process?

Thank you.

___
Development mailing list
developm...@qt-project.org <mailto:developm...@qt-project.org>
http://lists.qt-project.org/mailman/listinfo/development
<http://lists.qt-project.org/mailman/listinfo/development>



___
Development mailing list
developm...@qt-project.org <mailto:developm...@qt-project.org>
http://lists.qt-project.org/mailman/listinfo/development
<http://lists.qt-project.org/mailman/listinfo/development>






___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Development] qDebug()

2018-03-25 Thread Igor Mironchik



On 26.03.2018 07:50, Alexander Akulich wrote:

Hello Igor,

Does the linked solution help? See also comment #2 at 
https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1731646 
<https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1731646> 
(referenced in the stackoverflow answer).


No, this solution didn't help. I guess that there is another reason.



(The subject question belongs to interest@, not development@. Please 
drop developm...@qt-project.org <mailto:developm...@qt-project.org> in 
further replies).


On Mon, Mar 26, 2018 at 7:36 AM, Igor Mironchik 
<igor.mironc...@gmail.com <mailto:igor.mironc...@gmail.com>> wrote:


Hi,


On 26.03.2018 07:33, Timur Pocheptsov wrote:


On which platform is it? Are you sure it's 5.11 only?



I'm on Kubuntu 16.04. It is on 5.10 and 5.11 build from sources by
myself.



See, for example, the solution proposed here:



https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu

<https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu>


<https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu>

QT qDebug() stopped to work (no more printing to console ...

<https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu>
stackoverflow.com <http://stackoverflow.com>
After upgrading from Ubuntu 17.04 to 17.10, the QT qDebug() macro
stopped working and no longer displays the messages on the
console. How can the debug output be re ...

Best regards,

    Timur.


*From:* Development
<development-bounces+timur.pocheptsov=qt...@qt-project.org>
<mailto:development-bounces+timur.pocheptsov=qt...@qt-project.org>
on behalf of Igor Mironchik <igor.mironc...@gmail.com>
<mailto:igor.mironc...@gmail.com>
*Sent:* Monday, March 26, 2018 6:07:25 AM
*To:* developm...@qt-project.org <mailto:developm...@qt-project.org>
*Subject:* [Development] qDebug()
Hello,

Built sources from git repository (5.11 branch) doesn't print
qDebug()
messages to console. What I missed during the configuration process?

Thank you.

___
Development mailing list
developm...@qt-project.org <mailto:developm...@qt-project.org>
http://lists.qt-project.org/mailman/listinfo/development
<http://lists.qt-project.org/mailman/listinfo/development>



___
Development mailing list
developm...@qt-project.org <mailto:developm...@qt-project.org>
http://lists.qt-project.org/mailman/listinfo/development
<http://lists.qt-project.org/mailman/listinfo/development>




___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Development] qDebug()

2018-03-25 Thread Igor Mironchik

Hi,

Didn't try yet these solution, just more investigations...

With Qt 5.11 beta installed with online installer qDebug() works in GUI 
mode,


but with Qt 5.11 built from repository qDebug() doesn't work in GUI mode.


On 26.03.2018 07:50, Alexander Akulich wrote:

Hello Igor,

Does the linked solution help? See also comment #2 at 
https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1731646 
<https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1731646> 
(referenced in the stackoverflow answer).


(The subject question belongs to interest@, not development@. Please 
drop developm...@qt-project.org <mailto:developm...@qt-project.org> in 
further replies).


On Mon, Mar 26, 2018 at 7:36 AM, Igor Mironchik 
<igor.mironc...@gmail.com <mailto:igor.mironc...@gmail.com>> wrote:


Hi,


On 26.03.2018 07:33, Timur Pocheptsov wrote:


On which platform is it? Are you sure it's 5.11 only?



I'm on Kubuntu 16.04. It is on 5.10 and 5.11 build from sources by
myself.



See, for example, the solution proposed here:



https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu

<https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu>


<https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu>

QT qDebug() stopped to work (no more printing to console ...

<https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu>
stackoverflow.com <http://stackoverflow.com>
After upgrading from Ubuntu 17.04 to 17.10, the QT qDebug() macro
stopped working and no longer displays the messages on the
console. How can the debug output be re ...

Best regards,

    Timur.


*From:* Development
<development-bounces+timur.pocheptsov=qt...@qt-project.org>
<mailto:development-bounces+timur.pocheptsov=qt...@qt-project.org>
on behalf of Igor Mironchik <igor.mironc...@gmail.com>
<mailto:igor.mironc...@gmail.com>
*Sent:* Monday, March 26, 2018 6:07:25 AM
*To:* developm...@qt-project.org <mailto:developm...@qt-project.org>
*Subject:* [Development] qDebug()
Hello,

Built sources from git repository (5.11 branch) doesn't print
qDebug()
messages to console. What I missed during the configuration process?

Thank you.

___
Development mailing list
developm...@qt-project.org <mailto:developm...@qt-project.org>
http://lists.qt-project.org/mailman/listinfo/development
<http://lists.qt-project.org/mailman/listinfo/development>



___
Development mailing list
developm...@qt-project.org <mailto:developm...@qt-project.org>
http://lists.qt-project.org/mailman/listinfo/development
<http://lists.qt-project.org/mailman/listinfo/development>




___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QCameraInfo & Qt 5.10.1

2018-03-25 Thread Igor Mironchik

Hi,

I figured out what was changed. First of all QCamera::start() now just 
move camera to Loaded status (at least on Linux with GStreamer), not 
Active, so I had to listen camera status change and do additional steps 
in Loaded status. And second, if camera is in active status 
QCameraInfo::availableCameras() doesn't contains active camera, so I had 
to workaround it in my app.



On 23.03.2018 13:34, Igor Mironchik wrote:

Guys,

So much regressions in QCamera in Qt 5.9 and 5.10... Don't remember in 
what version all was ok, but now this is something horrible to work 
with QCamera in Linux. What was changed?



On 23.03.2018 12:47, Igor Mironchik wrote:

Hello.

Let's say I initialized QCamera with right settings (on Linux this is 
/dev/video0)


QCamera * cam = new QCamera( ... );

cam->start();

When the camera is started QCameraInfo::availableCameras() returns 
list of cameras without active camera. This is a regression from pre 
5.9 Qt. Is this a known issue?


And more

QCameraInfo info( *cam );

now produces camera's info for /dev/video1 whereas cam is /dev/video0.

Is this a know issue too?

How can I workaround these issues?

Thank you.





___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QCameraInfo & Qt 5.10.1

2018-03-23 Thread Igor Mironchik

Guys,

So much regressions in QCamera in Qt 5.9 and 5.10... Don't remember in 
what version all was ok, but now this is something horrible to work with 
QCamera in Linux. What was changed?



On 23.03.2018 12:47, Igor Mironchik wrote:

Hello.

Let's say I initialized QCamera with right settings (on Linux this is 
/dev/video0)


QCamera * cam = new QCamera( ... );

cam->start();

When the camera is started QCameraInfo::availableCameras() returns 
list of cameras without active camera. This is a regression from pre 
5.9 Qt. Is this a known issue?


And more

QCameraInfo info( *cam );

now produces camera's info for /dev/video1 whereas cam is /dev/video0.

Is this a know issue too?

How can I workaround these issues?

Thank you.



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QCameraInfo & Qt 5.10.1

2018-03-23 Thread Igor Mironchik

Hello.

Let's say I initialized QCamera with right settings (on Linux this is 
/dev/video0)


QCamera * cam = new QCamera( ... );

cam->start();

When the camera is started QCameraInfo::availableCameras() returns list 
of cameras without active camera. This is a regression from pre 5.9 Qt. 
Is this a known issue?


And more

QCameraInfo info( *cam );

now produces camera's info for /dev/video1 whereas cam is /dev/video0.

Is this a know issue too?

How can I workaround these issues?

Thank you.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] R: Qt3D FPS limits

2018-03-21 Thread Igor Mironchik



On 21.03.2018 19:39, Carlo Ferraresi wrote:

Hi,
I also noticed that PFS seem limited to 60.
I would like to know if there is a way to set this threshold since even 30 FPS 
are enough for my application.


Agree, and I would like to have possibility to change the limit, and to 
have possibility to set the limit to infinity...




Regards,
C.


On : mercoledì 21 marzo 2018 12:02

A: Qt Project 
Oggetto: [Interest] Qt3D FPS limits

Hello,

Does Qt 3D limits FPS by 60? Or FPS is always as much as possible?

Thank you.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qt3D FPS limits

2018-03-21 Thread Igor Mironchik

Hello,

Does Qt 3D limits FPS by 60? Or FPS is always as much as possible?

Thank you.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] RowLayout with Text with wrap mode

2018-03-05 Thread Igor Mironchik

Hi,

Thank you guys. Layout.fillWidth: true and width: parent.width together 
did the task.


I have one more question: what if I have anchors.left: parent.left that 
is not necessary, will be in this case some performance issue with it? 
Or I can just forget about not necessary bindings?


On 05.03.2018 17:00, Pierre-Yves Siret wrote:
You should always set a width for Text items (and a wrapMode and/or 
elide mode), unless you want your text to have no horizontal limit.
In your case you need to correct your code (it's not a workaround 
since it's the intended behaviour) is to set a width for your Texts 
(the 3).

Do this by using `Layout.fillWidth: true`.

BTW : your width: parent.width and anchors.left: parent.left have no 
effect here


I have not met the problems mentionned by Jérôme and using ListView is 
perfectly fine with me.



2018-03-05 14:42 GMT+01:00 Jérôme Godbout <godbo...@amotus.ca 
<mailto:godbo...@amotus.ca>>:


All the *View* type are a bit of a pain with Layout item. You need
to specify the height and width properly with the
Layout.minimumWidth/Height and maximum values. If you don't need
all the animation stuff from ListView, you can do a simple
GridLayout and fill the element which would be way simpler and you
will have full control on the sizing without the pain.


I for one, try to avoid the *View* element as much as possible.
Good GridLayout make it easier and you can even declare the items
by specifying the columns and row making a different repeater by
row or by column possible.


*From:* Interest
<interest-bounces+godboutj=amotus...@qt-project.org
<mailto:amotus...@qt-project.org>> on behalf of Igor Mironchik
<igor.mironc...@gmail.com <mailto:igor.mironc...@gmail.com>>
*Sent:* Saturday, March 3, 2018 4:18 AM
*To:* Qt Project
*Subject:* Re: [Interest] RowLayout with Text with wrap mode
I know that changing RowLayout to simple Row will solve the
problem. But
is it possible to solve this with layout?


    On 03.03.2018 10:24, Igor Mironchik wrote:
> Hello,
>
> I have a delegate for ListView with RowLayout inside:
>
> RowLayout {
>     anchors.fill: parent
>     spacing: 20
>     width: parent.width
>
>     ColumnLayout {
>     id: col
>     anchors.left: parent.left
>     spacing: 5
>
>     Text {
>     text: type === 0 ? qsTr( "Place:
" ) +
> model[ "PlaceRole" ] :
>     qsTr( "Code: " ) + model[
"CodeRole" ]
>     }
>
>     Text {
>     text: qsTr( "Amount: " ) + model[
> "AmountRole" ]
>     }
>     }
>
>     Text {
>     text: model[ "DescRole" ]
>     wrapMode: Text.WordWrap
>     }
>     }
>
>
> All is fine with except that the last Text item doesn't wrap
text. How
> can I workaround it? Thanks.
>

___
Interest mailing list
Interest@qt-project.org <mailto:Interest@qt-project.org>
http://lists.qt-project.org/mailman/listinfo/interest
<http://lists.qt-project.org/mailman/listinfo/interest>

___
Interest mailing list
Interest@qt-project.org <mailto:Interest@qt-project.org>
http://lists.qt-project.org/mailman/listinfo/interest
<http://lists.qt-project.org/mailman/listinfo/interest>




___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QML Layouts

2018-03-03 Thread Igor Mironchik

Hi,

QML Layouts this is just a magic...

I solved the problem with the following fixes:

import QtQuick 2.7
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3

ScrollView {
    id: screen
    ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
    ScrollBar.vertical.policy: ScrollBar.AlwaysOff
    leftPadding: content.width < width ? ( width - content.width ) / 2 : 0
    topPadding: content.height < height ? ( height - content.height ) / 
2 : 0


    // If this property is true then search will be by product's code,
    // otherwise search will be by place.
    property bool byCode: true

    property alias model: combo.model
    property alias currentIndex: combo.currentIndex

    ColumnLayout {
    id: content
    spacing: 20
    width: appWindow.width - 40

    Text {
    id: headerLabel
    anchors.horizontalCenter: parent.horizontalCenter
    wrapMode: Text.WordWrap
    width: parent.width
    horizontalAlignment: Text.AlignHCenter
    text: byCode ? qsTr( "Search by Code" ) : qsTr( "Search by 
Place" )

    Layout.fillWidth: true
    }

    ComboBox {
    id: combo
    editable: false
    implicitHeight: appWindow.minimumCtrlHeight
    currentIndex: -1
    textRole: "display"
    Layout.fillWidth: true
    delegate: ItemDelegate {
    id: comboDelegateControl
    height: appWindow.minimumCtrlHeight
    width: parent.width
    text: model[ "display" ]
    highlighted: combo.highlightedIndex === index
    background.anchors.fill: comboDelegateControl
    }

    onActivated: {
    focus = false
    okBtn.enabled = true
    stackView.focus = true
    }
    }

    Row {
    spacing: 20
    leftPadding: combo.x

    Button {
    id: okBtn
    text: qsTr( "OK" )
    enabled: false
    implicitHeight: appWindow.minimumCtrlHeight
    implicitWidth: ( combo.width - 20 ) / 2

    onClicked: {
    qmlCppSignals.internalSearch( combo.currentText )
    }
    }

    Button {
    id: cancelBtn
    text: qsTr( "Cancel" )
    enabled: true
    implicitHeight: appWindow.minimumCtrlHeight
    implicitWidth: ( combo.width - 20 ) / 2

    onClicked: {
    qmlCppSignals.returnBack()
        }
    }
    }
    }
}


On 04.03.2018 10:04, Igor Mironchik wrote:


Hello,

Could anybody explain me what did I do wrong?

Wron Layout

import QtQuick 2.7
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3

ScrollView {
    id: screen
    ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
    ScrollBar.vertical.policy: ScrollBar.AlwaysOff
    leftPadding: content.width < width ? ( width - content.width ) / 2 : 0
    topPadding: content.height < height ? ( height - content.height ) 
/ 2 : 0


    // If this property is true then search will be by product's code,
    // otherwise search will be by place.
    property bool byCode: true

    property alias model: combo.model
    property alias currentIndex: combo.currentIndex

    Column {
    id: content
    spacing: 20
    width: appWindow.width - 40

    Text {
    id: headerLabel
    anchors.horizontalCenter: parent.horizontalCenter
    wrapMode: Text.WordWrap
    width: parent.width
    horizontalAlignment: Text.AlignHCenter
    text: byCode ? qsTr( "Search by Code" ) : qsTr( "Search by 
Place" )

    }

    ComboBox {
    id: combo
    editable: false
    implicitHeight: appWindow.minimumCtrlHeight
    width: parent.width
    currentIndex: -1
    textRole: "display"
    delegate: ItemDelegate {
    id: comboDelegateControl
    height: appWindow.minimumCtrlHeight
    width: parent.width
    text: model[ "display" ]
    highlighted: combo.highlightedIndex === index
    background.anchors.fill: comboDelegateControl
    }

    onActivated: {
    focus = false
    okBtn.enabled = true
    stackView.focus = true
    }
    }

    Row {
    spacing: 20
    leftPadding: combo.x

    Button {
    id: okBtn
    text: qsTr( "OK" )
    enabled: false
    implicitHeight: appWindow.minimumCtrlHeight
    implicitWidth: ( combo.width - 20 ) / 2

    onClicked: {
    qmlCppSigna

[Interest] QML Layouts

2018-03-03 Thread Igor Mironchik

Hello,

Could anybody explain me what did I do wrong?

Wron Layout

import QtQuick 2.7
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3

ScrollView {
    id: screen
    ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
    ScrollBar.vertical.policy: ScrollBar.AlwaysOff
    leftPadding: content.width < width ? ( width - content.width ) / 2 : 0
    topPadding: content.height < height ? ( height - content.height ) / 
2 : 0


    // If this property is true then search will be by product's code,
    // otherwise search will be by place.
    property bool byCode: true

    property alias model: combo.model
    property alias currentIndex: combo.currentIndex

    Column {
    id: content
    spacing: 20
    width: appWindow.width - 40

    Text {
    id: headerLabel
    anchors.horizontalCenter: parent.horizontalCenter
    wrapMode: Text.WordWrap
    width: parent.width
    horizontalAlignment: Text.AlignHCenter
    text: byCode ? qsTr( "Search by Code" ) : qsTr( "Search by 
Place" )

    }

    ComboBox {
    id: combo
    editable: false
    implicitHeight: appWindow.minimumCtrlHeight
    width: parent.width
    currentIndex: -1
    textRole: "display"
    delegate: ItemDelegate {
    id: comboDelegateControl
    height: appWindow.minimumCtrlHeight
    width: parent.width
    text: model[ "display" ]
    highlighted: combo.highlightedIndex === index
    background.anchors.fill: comboDelegateControl
    }

    onActivated: {
    focus = false
    okBtn.enabled = true
    stackView.focus = true
    }
    }

    Row {
    spacing: 20
    leftPadding: combo.x

    Button {
    id: okBtn
    text: qsTr( "OK" )
    enabled: false
    implicitHeight: appWindow.minimumCtrlHeight
    implicitWidth: ( combo.width - 20 ) / 2

    onClicked: {
    qmlCppSignals.internalSearch( combo.currentText )
    }
    }

    Button {
    id: cancelBtn
    text: qsTr( "Cancel" )
    enabled: true
    implicitHeight: appWindow.minimumCtrlHeight
    implicitWidth: ( combo.width - 20 ) / 2

    onClicked: {
    qmlCppSignals.returnBack()
    }
    }
    }
    }
}

WTF with "OK" button?

Thanks.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] RowLayout with Text with wrap mode

2018-03-03 Thread Igor Mironchik
I know that changing RowLayout to simple Row will solve the problem. But 
is it possible to solve this with layout?



On 03.03.2018 10:24, Igor Mironchik wrote:

Hello,

I have a delegate for ListView with RowLayout inside:

RowLayout {
    anchors.fill: parent
    spacing: 20
    width: parent.width

    ColumnLayout {
    id: col
    anchors.left: parent.left
    spacing: 5

    Text {
    text: type === 0 ? qsTr( "Place: " ) + 
model[ "PlaceRole" ] :

    qsTr( "Code: " ) + model[ "CodeRole" ]
    }

    Text {
    text: qsTr( "Amount: " ) + model[ 
"AmountRole" ]

    }
    }

    Text {
    text: model[ "DescRole" ]
    wrapMode: Text.WordWrap
    }
    }


All is fine with except that the last Text item doesn't wrap text. How 
can I workaround it? Thanks.




___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] ColumnLayout | Repeater | implicitHeight of delegate

2018-03-03 Thread Igor Mironchik

Hi,

Solution found: in the delegate I have one Row, and I just set 
implicitHeight to row.implicitHeight



On 03.03.2018 11:42, Igor Mironchik wrote:

Hello,

ColumnLayout {
    width: appWindow.width

    Repeater {
    model: searchModel

    delegate: Item {
    Layout.fillWidth: true
    implicitHeight: childrenRect.height


How can I set implicitHeight of delegate so there will no bind loops? 
Thank you.


Without explicit set of implicitHeight ColumnLayot doesn't work...



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] ColumnLayout | Repeater | implicitHeight of delegate

2018-03-03 Thread Igor Mironchik

Hello,

ColumnLayout {
    width: appWindow.width

    Repeater {
    model: searchModel

    delegate: Item {
    Layout.fillWidth: true
    implicitHeight: childrenRect.height


How can I set implicitHeight of delegate so there will no bind loops? 
Thank you.


Without explicit set of implicitHeight ColumnLayot doesn't work...

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Different height of rows in ListView

2018-03-02 Thread Igor Mironchik

Hello,

Is it possible to have rows with different height in ListView in QML?

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] RowLayout with Text with wrap mode

2018-03-02 Thread Igor Mironchik

Hello,

I have a delegate for ListView with RowLayout inside:

RowLayout {
    anchors.fill: parent
    spacing: 20
    width: parent.width

    ColumnLayout {
    id: col
    anchors.left: parent.left
    spacing: 5

    Text {
    text: type === 0 ? qsTr( "Place: " ) + 
model[ "PlaceRole" ] :

    qsTr( "Code: " ) + model[ "CodeRole" ]
    }

    Text {
    text: qsTr( "Amount: " ) + model[ 
"AmountRole" ]

    }
    }

    Text {
    text: model[ "DescRole" ]
    wrapMode: Text.WordWrap
    }
    }


All is fine with except that the last Text item doesn't wrap text. How 
can I workaround it? Thanks.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QUdpSocket

2018-02-28 Thread Igor Mironchik

Hi,

On 28.02.2018 15:49, Konrad Rosenbaum wrote:

First off: UDP sockets are not connected - it is a connectionless protocol
in which every data packet is routed on its own.


Sure, I know it, thanks.



Your above code means that the socket will listen on somePort of every
open interface and may share this with other programs listening on the
same port.

I hope you are checking the return code of bind! If this is false then the
socket is left in an undefined state. In this state you will not receive
any data (or be able to send anything) - you may or may not get errors
when you try.


Sure, I check codes. My IPC works. I just want to know should I care 
about something with UDP or I can just do bind() and process pending 
datagrams, and don't worry about something additional in my code?! Thanks.




If somePort is 0 then the OS will chose a port for you. The assignment is
somewhat unpredictable.

If somePort is <=1024 then the OS may block your bind attempt, because the
port is privileged.

If somePort is used exclusively by another program or the OS, then bind
will also fail.

SomePort may be blocked in your firewall. Or you may simply be mistaken
about the port number. You can check those cases with Wireshark.

The network interface on which you are hoping to receive data may be down.
You can check this with ipconfig (Windows) or ifconfig (Linux/Unix/Mac).

Your sending process might be sending to the wrong target address - it
needs to send to either one of your interface addresses or a multicast
group that your socket has joined.

If your sending process has bound its socket then the address must be
compatible with the target address (e.g. it is impossible to send from
127.0.0.1 to 192.168.1.2 or from a multicast address). You can check
bindings with netstat, you can check whether packets are sent with
Wireshark.

Your sending process and your receiving process might use different
protocols (IPv4 vs. IPv6) if you messed up some settings. You can find out
with netstat and Wireshark.

Good luck with your diagnosis!

Konrad

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QML Menu

2018-02-28 Thread Igor Mironchik

Hello,

    Menu {
    id: menu
    x: menuButton.x - width + menuButton.width - 2
    y: toolBar.y + toolBar.height

    MenuItem {
    text: qsTr( "Change Password" )
    implicitHeight: minimumCtrlHeight
    onTriggered: {
    qmlCppSignals.disconnectRequest()
    }
    }
    }

On Android the result is a shorten text of menu item whereas there is 
enough space to show full text. How can I fix it?


Menu

Thanks.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QUdpSocket

2018-02-27 Thread Igor Mironchik

Hi. What I afraid that happened.

Is situation possible that QUdpSocket in bound state can be somehow 
disconnected (not from app's code) for any reason? I.e. something wrong 
on the network, UDP socket can't work properly, something wrong in the 
OS that leads to that UDP socket will not receive any datagrams? I ask 
for regular situations that I need to check in my application...



On 27.02.2018 18:26, Thiago Macieira wrote:

On terça-feira, 27 de fevereiro de 2018 01:40:11 PST Igor Mironchik wrote:

Hello,

Could anybody tell me if QUdpSocket after

QUdpSocket::bind( somePort, QUdpSocket::ShareAddress );

can be closed for some reasons and stopped for receiving new datagrams
(not from the application side, not from my code...)?

Do you mean "can I call close() after bind()?"

Yes.


What can be the reason of such behavior (disconnection of bound QUdpSocket)?

What behaviour?


P.S. Hope I'm clear in my question.

Not really.



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QML | Column | Buttons

2018-02-27 Thread Igor Mironchik

Hello,

How can I shrink all buttons to the widest width in QML Column?

I.e. I have:

Column {
    anchors.centerIn: parent
    spacing: 20

    Button {
    id: btn1
    implicitHeight: appWindow.minimumCtrlHeight
    Layout.fillWidth: true
    text: qsTr( "Press" )
    }

    Button {
    id: btn2
    implicitHeight: appWindow.minimumCtrlHeight
    Layout.fillWidth: true
    text: qsTr( "Press Press" )
    }

    Button {
    id: btn3
    implicitHeight: appWindow.minimumCtrlHeight
    Layout.fillWidth: true
    text: qsTr( "Press Press Press" )
    }

}

On desktop these buttons are with the same width, but on Android they 
are as small as possible.


Thank you.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QUdpSocket

2018-02-27 Thread Igor Mironchik

Hello,

Could anybody tell me if QUdpSocket after

QUdpSocket::bind( somePort, QUdpSocket::ShareAddress );

can be closed for some reasons and stopped for receiving new datagrams 
(not from the application side, not from my code...)?


What can be the reason of such behavior (disconnection of bound QUdpSocket)?

Thank you.

P.S. Hope I'm clear in my question.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Crash on Android

2018-02-26 Thread Igor Mironchik

Hello,

What was the day yesterday? :) It was stupid mistake. Solved. It was 
just wrong library name in Run in Android manifest.


Thank you.


On 26.02.2018 23:05, Jason H wrote:

Verify your API level,
Verify the libs
Verify the library spec order! The order on Android is manual and 
important. ld is stripped down and does not topilogically sort 
depenencies and load in the right order. Loading a library before its 
depenencies will fail.

*Sent:* Monday, February 26, 2018 at 11:37 AM
*From:* "Igor Mironchik" <igor.mironc...@gmail.com>
*To:* "Qt Project" <interest@qt-project.org>
*Subject:* Re: [Interest] Crash on Android

Hi

On 26.02.2018 18:08, Igor Mironchik wrote:

E/AndroidRuntime( 4017): java.lang.UnsatisfiedLinkError: Couldn't
load Stock from loader

dalvik.system.PathClassLoader[dexPath=/data/app/com.gmail.mironchik.igor.stock-1.apk,libraryPath=/data/app-lib/com.gmail.mironchik.igor.stock-1]:
findLibrary returned null


I guess that this is the main reason. Java classes from API 21, as I 
guess is not a problem, in Qt sources these classes just tests, am I 
right?


But what can be the reason? I built January 22, 2018 one QML app for 
Android and it works, I built this application right now and it 
crashes... I have no idea. I just deleted everything: Android stuff, 
Qt stuff, configs and preparing new environment.
___ Interest mailing list 
Interest@qt-project.org 
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Android Packagin

2018-02-26 Thread Igor Mironchik

Hello,

Could anybody explain me what's wrong in this simple application?

It can't start on Android device.

Thank you.

import QtQuick.Controls 2.2
import QtQuick 2.7

ApplicationWindow {
    id: appWindow
    visible: true
    width: 400
    height: 600

    Text {
    anchors.centerIn: parent
    text: qsTr( "Qt" )
    font.pixelSize: 50
    }
}


#include 
#include 


int main( int argc, char ** argv )
{
    QGuiApplication app( argc, argv );

    QQmlApplicationEngine engine;
    engine.load( QUrl( "qrc:/qml/main.qml" ) );

    if( engine.rootObjects().isEmpty() )
        return -1;

    return app.exec();
}



TEMPLATE = app
TARGET = Test.Mobile
QT += qml quickcontrols2 quick
CONFIG += c++14

SOURCES = main.cpp

RESOURCES = resources.qrc

DISTFILES += qml/main.qml

ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android

OTHER_FILES += android/AndroidManifest.xml


I can't deploy to Android anymore. And I don't have any idea.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Crash on Android

2018-02-26 Thread Igor Mironchik

Hi,

Why Qt apps started using Android API 21 classes on my machine?

I build app with API 17...

What changed since January 22?

Maybe this is a new QtCreator issue? Does anybody remember was updates 
of QtCreator since January 22?


Maybe this is my Android SDK?

Any hint?

Thanks.


On 26.02.2018 16:34, Igor Mironchik wrote:


Hello guys,

Could anybody explain me the reason of the crash, please?

D/dalvikvm( 4017): Late-enabling CheckJNI

W/ActivityThread( 4017): Application com.gmail.mironchik.igor.stock 
can be debugged on port 8100...


D/dalvikvm( 4017): GC_CONCURRENT freed 267K, 17% free 8728K/10408K, 
paused 2ms+8ms, total 37ms


D/dalvikvm( 4017): GC_CONCURRENT freed 441K, 18% free 8743K/10600K, 
paused 2ms+14ms, total 45ms


D/dalvikvm( 4017): GC_CONCURRENT freed 457K, 18% free 8774K/10616K, 
paused 3ms+6ms, total 64ms


D/dalvikvm( 4017): GC_FOR_ALLOC freed 204K, 19% free 8673K/10656K, 
paused 14ms, total 14ms


I/dalvikvm-heap( 4017): Grow heap (frag case) to 9.987MB for 
147472-byte allocation


D/dalvikvm( 4017): GC_FOR_ALLOC freed 2K, 19% free 8814K/10804K, 
paused 20ms, total 20ms


D/dalvikvm( 4017): GC_FOR_ALLOC freed 0K, 19% free 8814K/10804K, 
paused 13ms, total 13ms


I/dalvikvm-heap( 4017): Grow heap (frag case) to 10.301MB for 
331792-byte allocation


D/dalvikvm( 4017): GC_FOR_ALLOC freed 0K, 18% free 9138K/11132K, 
paused 12ms, total 12ms


D/dalvikvm( 4017): GC_FOR_ALLOC freed 149K, 20% free 9004K/11132K, 
paused 13ms, total 13ms


I/dalvikvm-heap( 4017): Grow heap (frag case) to 10.419MB for 
262160-byte allocation


D/dalvikvm( 4017): GC_FOR_ALLOC freed <1K, 19% free 9260K/11392K, 
paused 19ms, total 19ms


E/MoreInfoHPW_ViewGroup( 4017): Parent view is not a TextView

D/dalvikvm( 4017): Trying to load lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libgnustl_shared.so 
0x41d903e8


D/dalvikvm( 4017): Added shared lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libgnustl_shared.so 
0x41d903e8


D/dalvikvm( 4017): No JNI_OnLoad found in 
/data/data/com.gmail.mironchik.igor.stock/lib/libgnustl_shared.so 
0x41d903e8, skipping init


D/dalvikvm( 4017): Trying to load lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Core.so 0x41d903e8


D/dalvikvm( 4017): Added shared lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Core.so 0x41d903e8


I/QtCore ( 4017): Start

D/dalvikvm( 4017): Trying to load lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Network.so 0x41d903e8


D/dalvikvm( 4017): Added shared lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Network.so 0x41d903e8


D/dalvikvm( 4017): No JNI_OnLoad found in 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Network.so 
0x41d903e8, skipping init


D/dalvikvm( 4017): Trying to load lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Qml.so 0x41d903e8


D/dalvikvm( 4017): Added shared lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Qml.so 0x41d903e8


D/dalvikvm( 4017): No JNI_OnLoad found in 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Qml.so 0x41d903e8, 
skipping init


D/dalvikvm( 4017): Trying to load lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Gui.so 0x41d903e8


D/dalvikvm( 4017): Added shared lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Gui.so 0x41d903e8


D/dalvikvm( 4017): No JNI_OnLoad found in 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Gui.so 0x41d903e8, 
skipping init


D/dalvikvm( 4017): Trying to load lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Quick.so 0x41d903e8


D/dalvikvm( 4017): Added shared lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Quick.so 0x41d903e8


D/dalvikvm( 4017): No JNI_OnLoad found in 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Quick.so 
0x41d903e8, skipping init


D/dalvikvm( 4017): Trying to load lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5QuickParticles.so 
0x41d903e8


D/dalvikvm( 4017): Added shared lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5QuickParticles.so 
0x41d903e8


D/dalvikvm( 4017): No JNI_OnLoad found in 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5QuickParticles.so 
0x41d903e8, skipping init


D/dalvikvm( 4017): Trying to load lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5QuickTemplates2.so 
0x41d903e8


D/dalvikvm( 4017): Added shared lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5QuickTemplates2.so 
0x41d903e8


D/dalvikvm( 4017): No JNI_OnLoad found in 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5QuickTemplates2.so 
0x41d903e8, skipping init


D/dalvikvm( 4017): Trying to load lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5QuickControls2.so 
0x41d903e8


D/dalvikvm( 4017): Added shared lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5QuickControls2.so 
0x41d903e8


D/dalvikvm( 4017): No JNI_OnLoad found in 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5QuickControls2.so 
0x41d903e8, skipping init


D/dalvikvm( 4017): Trying to load lib 
/data/d

[Interest] Crash on Android

2018-02-26 Thread Igor Mironchik

Hello guys,

Could anybody explain me the reason of the crash, please?

D/dalvikvm( 4017): Late-enabling CheckJNI

W/ActivityThread( 4017): Application com.gmail.mironchik.igor.stock can 
be debugged on port 8100...


D/dalvikvm( 4017): GC_CONCURRENT freed 267K, 17% free 8728K/10408K, 
paused 2ms+8ms, total 37ms


D/dalvikvm( 4017): GC_CONCURRENT freed 441K, 18% free 8743K/10600K, 
paused 2ms+14ms, total 45ms


D/dalvikvm( 4017): GC_CONCURRENT freed 457K, 18% free 8774K/10616K, 
paused 3ms+6ms, total 64ms


D/dalvikvm( 4017): GC_FOR_ALLOC freed 204K, 19% free 8673K/10656K, 
paused 14ms, total 14ms


I/dalvikvm-heap( 4017): Grow heap (frag case) to 9.987MB for 147472-byte 
allocation


D/dalvikvm( 4017): GC_FOR_ALLOC freed 2K, 19% free 8814K/10804K, paused 
20ms, total 20ms


D/dalvikvm( 4017): GC_FOR_ALLOC freed 0K, 19% free 8814K/10804K, paused 
13ms, total 13ms


I/dalvikvm-heap( 4017): Grow heap (frag case) to 10.301MB for 
331792-byte allocation


D/dalvikvm( 4017): GC_FOR_ALLOC freed 0K, 18% free 9138K/11132K, paused 
12ms, total 12ms


D/dalvikvm( 4017): GC_FOR_ALLOC freed 149K, 20% free 9004K/11132K, 
paused 13ms, total 13ms


I/dalvikvm-heap( 4017): Grow heap (frag case) to 10.419MB for 
262160-byte allocation


D/dalvikvm( 4017): GC_FOR_ALLOC freed <1K, 19% free 9260K/11392K, paused 
19ms, total 19ms


E/MoreInfoHPW_ViewGroup( 4017): Parent view is not a TextView

D/dalvikvm( 4017): Trying to load lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libgnustl_shared.so 0x41d903e8


D/dalvikvm( 4017): Added shared lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libgnustl_shared.so 0x41d903e8


D/dalvikvm( 4017): No JNI_OnLoad found in 
/data/data/com.gmail.mironchik.igor.stock/lib/libgnustl_shared.so 
0x41d903e8, skipping init


D/dalvikvm( 4017): Trying to load lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Core.so 0x41d903e8


D/dalvikvm( 4017): Added shared lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Core.so 0x41d903e8


I/QtCore ( 4017): Start

D/dalvikvm( 4017): Trying to load lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Network.so 0x41d903e8


D/dalvikvm( 4017): Added shared lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Network.so 0x41d903e8


D/dalvikvm( 4017): No JNI_OnLoad found in 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Network.so 
0x41d903e8, skipping init


D/dalvikvm( 4017): Trying to load lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Qml.so 0x41d903e8


D/dalvikvm( 4017): Added shared lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Qml.so 0x41d903e8


D/dalvikvm( 4017): No JNI_OnLoad found in 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Qml.so 0x41d903e8, 
skipping init


D/dalvikvm( 4017): Trying to load lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Gui.so 0x41d903e8


D/dalvikvm( 4017): Added shared lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Gui.so 0x41d903e8


D/dalvikvm( 4017): No JNI_OnLoad found in 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Gui.so 0x41d903e8, 
skipping init


D/dalvikvm( 4017): Trying to load lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Quick.so 0x41d903e8


D/dalvikvm( 4017): Added shared lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Quick.so 0x41d903e8


D/dalvikvm( 4017): No JNI_OnLoad found in 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5Quick.so 0x41d903e8, 
skipping init


D/dalvikvm( 4017): Trying to load lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5QuickParticles.so 
0x41d903e8


D/dalvikvm( 4017): Added shared lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5QuickParticles.so 
0x41d903e8


D/dalvikvm( 4017): No JNI_OnLoad found in 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5QuickParticles.so 
0x41d903e8, skipping init


D/dalvikvm( 4017): Trying to load lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5QuickTemplates2.so 
0x41d903e8


D/dalvikvm( 4017): Added shared lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5QuickTemplates2.so 
0x41d903e8


D/dalvikvm( 4017): No JNI_OnLoad found in 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5QuickTemplates2.so 
0x41d903e8, skipping init


D/dalvikvm( 4017): Trying to load lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5QuickControls2.so 
0x41d903e8


D/dalvikvm( 4017): Added shared lib 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5QuickControls2.so 
0x41d903e8


D/dalvikvm( 4017): No JNI_OnLoad found in 
/data/data/com.gmail.mironchik.igor.stock/lib/libQt5QuickControls2.so 
0x41d903e8, skipping init


D/dalvikvm( 4017): Trying to load lib 
/data/data/com.gmail.mironchik.igor.stock/qt-reserved-files/plugins/platforms/android/libqtforandroid.so 
0x41d903e8


D/dalvikvm( 4017): Added shared lib 
/data/data/com.gmail.mironchik.igor.stock/qt-reserved-files/plugins/platforms/android/libqtforandroid.so 
0x41d903e8


I/Qt ( 4017): qt start

D/dalvikvm( 4017): Trying to load lib 

[Interest] Deploying to Android Emulator

2018-02-26 Thread Igor Mironchik

Hello,

I'm trying to deploy app into Android Emulator, and got following error:

igor@gmi:~/Android/Sdk/platform-tools$ 
/home/igor/Android/Sdk/platform-tools/adb -s emulator-5554 pull 
/system/bin/app_process32 
/home/igor/Work/Projects/stock/stock/build-mobile-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_4_for_Android_armv7-Debug/app_process

adb: error: remote object '/system/bin/app_process32' does not exist

What is the problem? Thank you.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QStaticText's size

2018-01-16 Thread Igor Mironchik

Solution is simple:

QTextDocument doc;
doc.setHtml( d->staticText.text() );
doc.setTextWidth( width );
doc.setDefaultTextOption( d->staticText.textOption() );

auto size = doc.size();

But this is a bug seems... Bug was reported for Qt4 and closed as Qt5 
already was in mainstream. Does anybody know is this bug reopened for Qt5?


Thank you.


16-Jan-18 12:40, Igor Mironchik пишет:

https://bugreports.qt.io/browse/QTBUG-26768


16-Jan-18 12:03, Igor Mironchik пишет:

Hello,

Is it possible to obtain correct size of the QStaticText with set width?

I use:

QStaticText st( "Some text..." );
st.setTextWidth( width );

and st.size() returns always the same size, what width I wouldn't set.

Thank you.





___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QStaticText's size

2018-01-16 Thread Igor Mironchik

https://bugreports.qt.io/browse/QTBUG-26768


16-Jan-18 12:03, Igor Mironchik пишет:

Hello,

Is it possible to obtain correct size of the QStaticText with set width?

I use:

QStaticText st( "Some text..." );
st.setTextWidth( width );

and st.size() returns always the same size, what width I wouldn't set.

Thank you.



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QStaticText's size

2018-01-16 Thread Igor Mironchik

Hello,

Is it possible to obtain correct size of the QStaticText with set width?

I use:

QStaticText st( "Some text..." );
st.setTextWidth( width );

and st.size() returns always the same size, what width I wouldn't set.

Thank you.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QtCreator, the past...

2018-01-12 Thread Igor Mironchik

Hi,

What was used to write first version of QtCreator, what IDE? Just 
interesting... :)


Thank you.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Contributing to Qt

2017-12-30 Thread Igor Mironchik

Thank you guys, I've got all necessary information now...


On 30.12.2017 13:53, Thiago Macieira wrote:

On Saturday, 30 December 2017 05:12:04 -02 Igor Mironchik wrote:

Great but now I have a question: how should I correctly push my changes?

Provide a working example please.

Hello Igor

Please see http://wiki.qt.io/Qt_Contribution_Guidelines. One of the first
links in that page is the set up for Gerrit, which will instruct you on
installing the commit hook that will create the Change-Id. Once both those
steps are done (you may need to recreate your commit with "git commit --
amend"), you'll be able to push to Gerrit.



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Contributing to Qt

2017-12-29 Thread Igor Mironchik

Hello,

I want to contribute a little to Qt.

I cloned qtbase from git://code.qt.io/qt/qtbase.git

Created branch with

git branch test

git checkout test

made changes

git commit -a

Great but now I have a question: how should I correctly push my changes?

Provide a working example please.

Thank you.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Building Qt 5.10

2017-12-24 Thread Igor Mironchik

Hi,


On 24.12.2017 18:17, Sérgio Martins wrote:

On Sun, Dec 24, 2017 at 6:39 AM, Igor Mironchik
<igor.mironc...@gmail.com> wrote:


On 24.12.2017 14:43, Thiago Macieira wrote:

On domingo, 24 de dezembro de 2017 07:55:34 -02 Igor Mironchik wrote:

Hello,

Does anybody know if -freetype argument works in ./configure on Linux
with Qt 5.10?

I downloaded Qt 5.10 sources, and -freetype always receives "yes"
option, qt/system/no don't work.

The arguments are valid. See src/gui/configure.json:

 "freetype": { "type": "enum", "values": [ "no", "qt", "system"
] },

What exactly does configure tell you when you try to use --freetype=no or
-no-freetype?


igor@gmi:~/Tmp/qt-everywhere-src-5.10.0$ ./configure -freetype=qt

Use -qt-freetype, as documented in http://doc.qt.io/qt-5/configure-options.html


I see, thank you.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Building Qt 5.10

2017-12-24 Thread Igor Mironchik



On 24.12.2017 14:43, Thiago Macieira wrote:

On domingo, 24 de dezembro de 2017 07:55:34 -02 Igor Mironchik wrote:

Hello,

Does anybody know if -freetype argument works in ./configure on Linux
with Qt 5.10?

I downloaded Qt 5.10 sources, and -freetype always receives "yes"
option, qt/system/no don't work.

The arguments are valid. See src/gui/configure.json:

"freetype": { "type": "enum", "values": [ "no", "qt", "system" ] },

What exactly does configure tell you when you try to use --freetype=no or
-no-freetype?


igor@gmi:~/Tmp/qt-everywhere-src-5.10.0$ ./configure -freetype=qt
+ cd qtbase
+ /home/igor/Tmp/qt-everywhere-src-5.10.0/qtbase/configure -top-level 
-freetype=qt

Creating qmake...
...Done.
Info: creating super cache file 
/home/igor/Tmp/qt-everywhere-src-5.10.0/.qmake.super

ERROR: Unknown command line option '-freetype=qt'.
igor@gmi:~/Tmp/qt-everywhere-src-5.10.0$ ./configure -freetype=no -redo
+ cd qtbase
+ /home/igor/Tmp/qt-everywhere-src-5.10.0/qtbase/configure -top-level 
-freetype=no -redo

No config.opt present - cannot redo configuration.
igor@gmi:~/Tmp/qt-everywhere-src-5.10.0$ ./configure -freetype=no
+ cd qtbase
+ /home/igor/Tmp/qt-everywhere-src-5.10.0/qtbase/configure -top-level 
-freetype=no

Creating qmake...
.Done.
ERROR: Unknown command line option '-freetype=no'.
igor@gmi:~/Tmp/qt-everywhere-src-5.10.0$ ./configure -freetype no
+ cd qtbase
+ /home/igor/Tmp/qt-everywhere-src-5.10.0/qtbase/configure -top-level 
-freetype no

Creating qmake...
.Done.
ERROR: Invalid value 'yes' supplied to command line option 'freetype'.

ERROR: Invalid command line parameter 'no'.
igor@gmi:~/Tmp/qt-everywhere-src-5.10.0$ ./configure -freetype
+ cd qtbase
+ /home/igor/Tmp/qt-everywhere-src-5.10.0/qtbase/configure -top-level 
-freetype

Creating qmake...
.Done.
ERROR: Invalid value 'yes' supplied to command line option 'freetype'.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Deleting of QEntity in Qt 3D

2017-12-24 Thread Igor Mironchik

Hello,

What is proper way to delete QEntity in Qt 3D? Let's say I have one root 
entity and a set of children. At one point of time I want to delete one 
child. I just do deleteLater() or simple delete.


But application sometimes crashes with:

1 Qt3DCore::QBackendNode::peerId qbackendnode.cpp    170  0x77e67a28
2 Qt3DRender::Render::GraphicsContext::loadShader graphicscontext.cpp 
508  0x77bd276e
3 Qt3DRender::Render::Renderer::updateGLResources renderer.cpp    
1098 0x77b1ac74
4 Qt3DRender::Render::Renderer::doRender renderer.cpp    614  
0x77b1c63e
5 Qt3DRender::Render::Renderer::render renderer.cpp    553  
0x77b1365b
6 Qt3DRender::Render::RenderThread::run renderthread.cpp    86   
0x77b132f4

7 QThreadPrivate::start qthread_unix.cpp    376  0x76911cbf
8 start_thread pthread_create.c    333  0x758366ba
9 clone clone.S 109  0x75cdd3dd

Have to say that I receive "No shader program found for DNA" in console 
output.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Building Qt 5.10

2017-12-24 Thread Igor Mironchik

Hello,

Does anybody know if -freetype argument works in ./configure on Linux 
with Qt 5.10?


I downloaded Qt 5.10 sources, and -freetype always receives "yes" 
option, qt/system/no don't work.


Thank you.

Maybe this is a bug?

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] No shader program found for DNA

2017-12-22 Thread Igor Mironchik

Hello,

Should I care about message "No shader program found for DNA" in Qt3D 
project?


I began to receive such messages in Qt 5.10.

Thank you.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QWidget & Transformations

2017-12-02 Thread Igor Mironchik

Hello,

What do you think about having possibility to set QTransform on QWidget? 
I.e. to have possibility to transform widgets like QML types?


I think it'd be a great deal. But I'm not sure that this is possible. Is 
it possible?


Thank you.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] mkspecs/features/qt_common.prf

2017-11-30 Thread Igor Mironchik



On 30.11.2017 19:30, Thiago Macieira wrote:

On quinta-feira, 30 de novembro de 2017 07:55:09 PST Igor Mironchik wrote:

gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.5)

This is the problem: your GCC is too old. This binary you're running was
compiled agianst GCC 6 so you need to use that version.

Where did you get that Qt?


Official Qt 5.9.3 installed with Qt Online Installer.




Is it known issue?

https://bugreports.qt.io/browse/QTBUG-64820



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] mkspecs/features/qt_common.prf

2017-11-30 Thread Igor Mironchik

Hello,

Building Qt 3D Studio...

At the beginning got:

Unknown options for g++ -Wshift-overflow=2 -Wduplicated-cond

I'm on Ubuntu 16.04

gcc -v

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 
5.4.0-6ubuntu1~16.04.5' 
--with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs 
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ 
--prefix=/usr --program-suffix=-5 --enable-shared 
--enable-linker-build-id --libexecdir=/usr/lib 
--without-included-gettext --enable-threads=posix --libdir=/usr/lib 
--enable-nls --with-sysroot=/ --enable-clocale=gnu 
--enable-libstdcxx-debug --enable-libstdcxx-time=yes 
--with-default-libstdcxx-abi=new --enable-gnu-unique-object 
--disable-vtable-verify --enable-libmpx --enable-plugin 
--with-system-zlib --disable-browser-plugin --enable-java-awt=gtk 
--enable-gtk-cairo 
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre 
--enable-java-home 
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 
--with-arch-directory=amd64 
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc 
--enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic 
--enable-checking=release --build=x86_64-linux-gnu 
--host=x86_64-linux-gnu --target=x86_64-linux-gnu

Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.5)

In mkspecs/features/qt_common.prf I had to comment 
greaterThan(QT_GCC_MAJOR_VERSION, 5)...


clang {
    # Clang 3.5 introduced -Wdate-time
    # The conditional assumes we aren't compiling against Clang 2.x anymore
    greaterThan(QT_CLANG_MAJOR_VERSION, 
3)|greaterThan(QT_CLANG_MINOR_VERSION, 4): \

    QMAKE_CXXFLAGS_WARN_ON += -Wdate-time
} else: gcc:!intel_icc {
    QMAKE_CXXFLAGS_WARN_ON += -Wvla
    # GCC 5 introduced -Wdate-time
    greaterThan(QT_GCC_MAJOR_VERSION, 4): QMAKE_CXXFLAGS_WARN_ON += 
-Wdate-time

    # GCC 6 introduced these
    # greaterThan(QT_GCC_MAJOR_VERSION, 5): QMAKE_CXXFLAGS_WARN_ON += 
-Wshift-overflow=2 -Wduplicated-cond
    # GCC 7 has a lot of false positives relating to this, so disable 
completely
    greaterThan(QT_GCC_MAJOR_VERSION, 6): QMAKE_CXXFLAGS_WARN_ON += 
-Wno-stringop-overflow

}

Is it known issue?

Thank you.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [QT3D] Has anyone figured out how to use a QSkyboxEntity?

2017-11-18 Thread Igor Mironchik

Hi,


On 19.11.2017 01:00, Pierre Chicoine wrote:
This is the only place I found on the Internet that Igor sent me.https://github.com/igormironchik/3Dtree 


Thank Igor.
Strange to note. It only works in his program in Kubuntu. When I try it, using 
his program with Android,
or mine, in Kubuntu or Android, I get this message, which repeats over and over 
again:


It works on Windows too, I guess that it will work on MacOS. But I guess 
that it won't work on any mobile platform because 3Dtree mixes Qt 
widgets with Qt3D, I embed Qt3DExtras::Qt3DWindow to Qt widget based 
application...


I tested simplest example on Android 4.2.2 and it works...

int main( int argc, char ** argv )
{
    QApplication app( argc, argv );

    QScopedPointer< Qt3DExtras::Qt3DWindow > view( new 
Qt3DExtras::Qt3DWindow );


    QScopedPointer< Qt3DCore::QEntity > root( new Qt3DCore::QEntity );

    // Camera
    Qt3DRender::QCamera * cameraEntity = view->camera();

    cameraEntity->lens()->setPerspectiveProjection(
        45.0f, 16.0f / 9.0f, 0.1f, 1000.0f );
    cameraEntity->setPosition( QVector3D( 0.0f, 5.0f, 20.0f ) );
    cameraEntity->setUpVector( QVector3D( 0.0f, 1.0f, 0.0f ) );
    cameraEntity->setViewCenter( QVector3D( 0.0f, 5.0f, 0.0f ) );

    Qt3DCore::QEntity * lightEntity = new Qt3DCore::QEntity( root.data() );

    Qt3DRender::QPointLight * light = new Qt3DRender::QPointLight( 
lightEntity );

    light->setColor( Qt::white );
    light->setIntensity( 1.0f );
    lightEntity->addComponent( light );

    Qt3DCore::QTransform * lightTransform = new Qt3DCore::QTransform(
        lightEntity );
    lightTransform->setTranslation( cameraEntity->position() );
    lightEntity->addComponent( lightTransform );

    Qt3DExtras::QSkyboxEntity * skyBox = new Qt3DExtras::QSkyboxEntity( 
root.data() );

    skyBox->setBaseName( QStringLiteral( "qrc:/res/skybox" ) );
    skyBox->setExtension( QStringLiteral( ".tga" ) );

    const float baseScale = 0.1f;

    Qt3DCore::QTransform * skyTransform = new Qt3DCore::QTransform( 
skyBox );
    skyTransform->setTranslation( QVector3D( 0.0f, baseScale / 8.0f - 
0.001f, 0.0f ) );
    skyTransform->setScale3D( QVector3D( baseScale, baseScale / 4.0f, 
baseScale ) );

    skyBox->addComponent( skyTransform );

    view->setRootEntity( root.take() );

    view->show();

    return app.exec();
}


[Qt3DRender::GLTexture] No QTextureImageData generated from functor yet, 
texture will be invalid for this frame.
There a fixed bug In Qt's bug list that shows that this message has been fixed. 
So obviously, I don't understand
what I'm doing wrong or it's a real bug.
So I'm asking once more. Has anyone figured out how to properly use 
QSkyboxEntity? Any input would be appreciated.
Thanks
pQSkyboxEntity=newQt3DExtras::QSkyboxEntity(pQEntity);
pQSkyboxEntity->setBaseName(:/media/Skyboxes/skybox);
pQSkyboxEntity->setExtension("tga");
constfloatbaseScale=0.1f;
 Qt3DCore::QTransform*skyTransform=newQt3DCore::QTransform();
skyTransform->setTranslation(QVector3D(0.0f,baseScale/8.0f-0.001f,0.0f));
skyTransform->setScale3D(QVector3D(baseScale,baseScale/4.0f,baseScale));
 pQSkyboxEntity->addComponent(skyTransform);
}


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qt3D & Instancing

2017-11-15 Thread Igor Mironchik

Hello,

What's the plans/state of instanced rendering in Qt 3D?

Thank you.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [QT3D] Does anyone have an example of using QSkyboxEntity?

2017-11-15 Thread Igor Mironchik

Hi,

I used QSkyboxEntity in a small playing with Qt3D... 
https://github.com/igormironchik/3Dtree



On 16.11.2017 02:27, Pierre Chicoine wrote:

Has anyone figured out how to use a QSkyboxEntity?

An example would be awesome.

I've tried all sorts of techniques.  I use C++ but I'm sure I could 
translate a QML file if anyone has one available.




___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QML Dialog -> onClosing

2017-08-21 Thread Igor Mironchik

Hi,

Let's say I have the next dialog in QML:

Dialog{

id:dlg

title:qsTr("Dialog...")

standardButtons:StandardButton.Ok

Text{

anchors.centerIn:parent

font.pixelSize:30

font.bold:true

text:qsTr("Text")

}

onAccepted:{doSomething()}

}

This is nice. But how can I handle closing dialog, i.e. when user clicks on X 
window button?

Thank you.



---
This email has been checked for viruses by AVG.
http://www.avg.com
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QML import

2017-08-02 Thread Igor Mironchik
I got the solution - for QML and QRC friendship the only solution is to 
use QRC urls...


I.e.

engine.load(QUrl("qrc:/qml/main.qml"));

works...


2017-08-02 13:47, Igor Mironchik пишет:


Hi.

I have directory "qml" with QML files where are placed main.qml and 
MyButton.qml.


This directory is in QRC, i.e. ":/qml/main.qml" and 
":/qml/MyButton.qml" are in the resources.


When I load QML with

QQmlApplicationEngineengine(":/qml/main.qml");

I receive

file::/qml/main.qml:13 MyButton is not a type

How to fix it?





---
This email has been checked for viruses by AVG.
http://www.avg.com
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QML import

2017-08-02 Thread Igor Mironchik

Hi.

I have directory "qml" with QML files where are placed main.qml and 
MyButton.qml.


This directory is in QRC, i.e. ":/qml/main.qml" and ":/qml/MyButton.qml" 
are in the resources.


When I load QML with

QQmlApplicationEngineengine(":/qml/main.qml");

I receive

file::/qml/main.qml:13 MyButton is not a type

How to fix it?



---
This email has been checked for viruses by AVG.
http://www.avg.com
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Windows 10 & QCamera

2017-05-20 Thread Igor Mironchik

Hi,


2017-05-15 09:34, Maurice Kalinowski пишет:

Hi,


I wrote earlier that QCamera doesn't work on Windows 10 with Qt 5.9 and
MSVC 2017.

I did a little research and found that if switch Windows 10 to developer mode
then QCamera begins to work.

So my question is - how to ship applications to Windows 10 which uses
QCamera? Do I need something to do? Or it was just one time issue of
exactly my machine and my Windows 10?


[Maurice Kalinowski]
Are you targeting UWP or classic application?

In the first case, you might want to check for capabilities in your manifest, 
even though they should be set automatically.


Sorry, this email has been filtered by spam filter, and I just found it.

I'm targeting classic application...

---
This email has been checked for viruses by AVG.
http://www.avg.com

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QtCreator & CMake

2017-05-15 Thread Igor Mironchik

Hello,

When I open CMake project with QtCreator I can see build directory in my 
sources tree...


project\build\CMakeFiles\3.8.0\CompilerIdC\Debug\CompilerIdC.tlog\

with link-VCTIP.read.197.tlog, for example

with content

#Command:
C:\USERS\...\APPDATA\LOCAL\MICROSOFT\WINDOWS\INETCACHE\IE\X07V0CLM\DYNTELCONFIG[1].CACHE
C:\USERS\..\APPDATA\LOCAL\MICROSOFT\WINDOWS\INETCACHE\IE\0GT1U247\DYNTELCONFIG.JSON[1].CACHE
C:\USERS\..\APPDATA\LOCAL\MICROSOFT\WINDOWS\INETCACHE\IE\X07V0CLM\DYNTELCONFIG[1].CACHE

What is it?


---
This email has been checked for viruses by AVG.
http://www.avg.com

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Windows 10 & QCamera

2017-05-13 Thread Igor Mironchik

Hello,

I wrote earlier that QCamera doesn't work on Windows 10 with Qt 5.9 and 
MSVC 2017.


I did a little research and found that if switch Windows 10 to developer 
mode then QCamera begins to work.


So my question is - how to ship applications to Windows 10 which uses 
QCamera? Do I need something to do? Or it was just one time issue of 
exactly my machine and my Windows 10?


Thank you.


---
This email has been checked for viruses by AVG.
http://www.avg.com

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] qt.io

2017-05-12 Thread Igor Mironchik

Hello,

What's happened with qt.io? How can I download Open Source Qt now?

Thank you.


---
This email has been checked for viruses by AVG.
http://www.avg.com

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qt.io

2017-05-12 Thread Igor Mironchik

Found...


2017-05-12 21:09, Igor Mironchik пишет:

Hello,

What's happened with qt.io? How can I download Open Source Qt now?

Thank you.




---
This email has been checked for viruses by AVG.
http://www.avg.com

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QMake

2017-05-08 Thread Igor Mironchik



2017-05-08 10:12, Hamish Moffatt пишет:

On 08/05/17 17:07, Igor Mironchik wrote:

Hi,

Is it possible to set in qmake project file to put executable right 
in "." directory and don't use "debug" and "release" subdirs?


Which platform? It does that on linux.


I'm on Windows.



Maybe you can use the DESTDIR variable to control where it's output. 
(I had trouble with that on Windows or Mac, I can't remember which.)


I use DESTDIR = . But executable places in "debug" or "release" subfolder.



The inconsistencies between platforms are annoying.

Hamish
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest



---
This email has been checked for viruses by AVG.
http://www.avg.com

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QMake

2017-05-08 Thread Igor Mironchik

Hi,

Is it possible to set in qmake project file to put executable right in 
"." directory and don't use "debug" and "release" subdirs?


Thank you.


---
This email has been checked for viruses by AVG.
http://www.avg.com

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Args

2017-05-07 Thread Igor Mironchik

Hi,

Using exceptions in arguments parser is something that just cannot be justified.


Why not?

Even in the danger of starting a huge debate about "exceptions vs return error 
code" here are my thoughts about it:

Exceptions should just be used for... well, /exceptional/ cases.

So what would be an "exceptional case" for a command line parser then? Certainly not wrongly 
provided arguments. Humans tend to misspell words all the time, so that's "the norm": business as 
usual for a command line parser to validate the input and inform the user appropriately (with a usage help, 
similar spelled commands etc.). Nothing which cries "exception!" here IMHO.

The only thing I could think of in a 10 second brainstorming which could be considered 
"exceptional" is when e.g. "stdin" (or some socket even from which to read commands, but 
even this would be a bordercase, as it could be considered "normal" that a socket cannot be opened) 
cannot be opened for reading (which is somewhat a constructed example, as arguments are usually passed as 
input parameters to main() anyway - but you get the idea).

The internet is full of articles - and opinions - about when to use exceptions, and when 
not (and we haven't even touched the topic of "unchecked vs checked exceptions" 
- at least in the Java camp that's all the rage ;)).


I will not start that holly war about what you said :) I just say 
that I will think about more and more user friendly messages on wrong 
user input. I wanted to simplify a life of a developer and a user of 
console application. But developer will be informed about "errors" 
through the exceptions.


---
This email has been checked for viruses by AVG.
http://www.avg.com

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Args

2017-05-04 Thread Igor Mironchik



2017-05-04 11:41, Konstantin Tokarev пишет:

Using exceptions in arguments parser is something that just cannot be justified.



Why not?


---
This email has been checked for viruses by AVG.
http://www.avg.com

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


  1   2   3   4   5   6   >