Re: [Interest] Seeking workaround for TableView contentX|contentY bug when hiding columns

2020-05-10 Thread Patrick Stinson
For what it's worth, emitting `modelReset` from the model does seem to reset 
the corruption, but then you loose any view state, scroll positions, etc.

> On May 9, 2020, at 5:50 PM, Patrick Stinson  wrote:
> 
> I found a rather serious bug where TableView.contentX and TableView.contentY 
> gets corrupted when you hide and reshow columns or rows (bug report here: 
> https://bugreports.qt.io/browse/QTBUG-82535 
> <https://bugreports.qt.io/browse/QTBUG-82535>). I'm looking for a workaround 
> since this makes it impossible to use overlay items.
> 
> Resizing the width of a TableView with columnWidthProvider results in the 
> contentX property having the wrong value. The following video demonstrate how 
> the red rectangle, which has a fixed x of zero, jumps to the right as you 
> resize the table view:
> 
> https://youtu.be/9YEaoTUR4Eo <https://youtu.be/9YEaoTUR4Eo>
> 
> 
> import QtQuick 2.14
> import QtQml.Models 2.14
> import Qt.labs.qmlmodels 1.0
> 
> 
> TableView {
> id: table
> 
> Timer {
> // Just resize the table twice on init to programatically reproduce 
> the bug.
> // comment this entire item out to reproduce the bug with manual 
> window resizing.
> id: timer
> interval: 1
> running: true
> repeat: true
> property int count: 0
> onTriggered: {
> if(count == 0){
> table.width = 400
> } else if(count == 2) {
> timer.running = false
> }
> count++
> }
> }
> 
> // This "overlay" element doesn't stay put as it should since `x` is 
> always zero.
> // 
> https://doc.qt.io/qt-5/qml-qtquick-tableview.html#overlays-and-underlays 
> <https://doc.qt.io/qt-5/qml-qtquick-tableview.html#overlays-and-underlays>
> Rectangle {
> width: 20
> height: table.contentHeight
> color: 'red'
> }
> 
> onWidthChanged: {
> table.forceLayout()
> print('contentX', contentX) // shows that contextX does not match 
> what is displayed.
> }
> 
> // Bug happens when a zero-width column changes to a positive-width 
> column.
> // So expand the table from less than 200 width to greater than 200 width 
> to corrupt contentX.
> columnWidthProvider: function(col) {
> if(table.width > 200) {
> return 40
> } else {
> return col % 2 == 0 ? 0 : 60 // change the `0` width to `1` and 
> the bug doesn't happen
> }
> }
> 
> delegate: Rectangle {
> implicitHeight: 30
> border {
> width: 1
> }
> Text { text: display }
> }
> 
> model: TableModel {
> TableModelColumn { display: 'col_1' }
> TableModelColumn { display: 'col_2' }
> rows: [
> { col_1: 'cell 1', col_2: 'cell 1' },
> ]
> }
> }
> 
> 

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


[Interest] Seeking workaround for TableView contentX|contentY bug when hiding columns

2020-05-09 Thread Patrick Stinson
I found a rather serious bug where TableView.contentX and TableView.contentY 
gets corrupted when you hide and reshow columns or rows (bug report here: 
https://bugreports.qt.io/browse/QTBUG-82535 
). I'm looking for a workaround 
since this makes it impossible to use overlay items.

Resizing the width of a TableView with columnWidthProvider results in the 
contentX property having the wrong value. The following video demonstrate how 
the red rectangle, which has a fixed x of zero, jumps to the right as you 
resize the table view:

https://youtu.be/9YEaoTUR4Eo 


import QtQuick 2.14
import QtQml.Models 2.14
import Qt.labs.qmlmodels 1.0


TableView {
id: table

Timer {
// Just resize the table twice on init to programatically reproduce the 
bug.
// comment this entire item out to reproduce the bug with manual window 
resizing.
id: timer
interval: 1
running: true
repeat: true
property int count: 0
onTriggered: {
if(count == 0){
table.width = 400
} else if(count == 2) {
timer.running = false
}
count++
}
}

// This "overlay" element doesn't stay put as it should since `x` is always 
zero.
// https://doc.qt.io/qt-5/qml-qtquick-tableview.html#overlays-and-underlays
Rectangle {
width: 20
height: table.contentHeight
color: 'red'
}

onWidthChanged: {
table.forceLayout()
print('contentX', contentX) // shows that contextX does not match what 
is displayed.
}

// Bug happens when a zero-width column changes to a positive-width column.
// So expand the table from less than 200 width to greater than 200 width 
to corrupt contentX.
columnWidthProvider: function(col) {
if(table.width > 200) {
return 40
} else {
return col % 2 == 0 ? 0 : 60 // change the `0` width to `1` and the 
bug doesn't happen
}
}

delegate: Rectangle {
implicitHeight: 30
border {
width: 1
}
Text { text: display }
}

model: TableModel {
TableModelColumn { display: 'col_1' }
TableModelColumn { display: 'col_2' }
rows: [
{ col_1: 'cell 1', col_2: 'cell 1' },
]
}
}


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


Re: [Interest] Customizing ui/rcc compiler in qmake

2020-04-22 Thread Patrick Stinson
For the record, this seems to have helped:


win32 {
SIP_PLATFORM = WS_WIN
} macx {
SIP_PLATFORM = WS_MACX
} linux-g++ {
SIP_PLATFORM = WS_LINUX
}

# sip compiler
sip_compiler.input = SIP_SOURCE
sip_compiler.output = sipAPI${QMAKE_FILE_BASE}.h sip${QMAKE_FILE_BASE}part0.cpp 
sip${QMAKE_FILE_BASE}part1.cpp sip${QMAKE_FILE_BASE}part2.cpp 
sip${QMAKE_FILE_BASE}part3.cpp sip${QMAKE_FILE_BASE}part4.cpp
sip_compiler.CONFIG = no_link target_predeps dep_lines
win32 {
sip_compiler.commands = sip -t $$SIP_PLATFORM -I 
Z:\\dev\\vendor\\sysroot-dev-win-32\\Python-3.6.4\\sip\\PyQt5 -c . -j 5 -P -o 
${QMAKE_FILE_NAME}
} macx|linux-g++ {
sip_compiler.commands = sip -t $$SIP_PLATFORM `python3 
get_some_sip_flags.py` -c . -j 5 -P -o ${QMAKE_FILE_NAME}
}
sip_compiler.variable_out = GENERATED_FILES
sip_compiler.name = SIP ${QMAKE_FILE_IN}
QMAKE_EXTRA_COMPILERS += sip_compiler

target.files = $$TARGET.so
target.depends = sip$$TARGETpart0.cpp sip$$TARGETpart1.cpp sip$$TARGETpart2.cpp 
sip$$TARGETpart3.cpp sip$$TARGETpart4.cpp
target.CONFIG = no_check_exist

# pyuic5 compiler
pyuic5.input = FORMS
pyuic5.output = ${QMAKE_FILE_BASE}_form.py
pyuic5.dependency_type = TYPE_UI
pyuic5.CONFIG = no_link target_predeps dep_lines
pyuic5.commands = pyuic5 ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_OUT}
pyuic5.variable_out = GENERATED_FILES
pyuic5.name = PyUIC5 ${QMAKE_FILE_IN}
QMAKE_EXTRA_COMPILERS += pyuic5

#pyrcc5 compiler
pyrcc5.input = RESOURCES
pyrcc5.output = qrc_${QMAKE_FILE_BASE}.py
pyrcc5.dependency_type = TYPE_RCC
pyrcc5.CONFIG = no_link target_predeps dep_lines
pyrcc5.commands = pyrcc5 ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_OUT}
QMAKE_EXTRA_COMPILERS += pyrcc5



> On Apr 21, 2020, at 10:50 AM, Patrick Stinson  wrote:
> 
> Sorry, I meant uic not rcc.
> 
>> On Apr 21, 2020, at 10:14 AM, Patrick Stinson  wrote:
>> 
>> Is there a way to customize the ui compiler to use a command other than rcc?
>> 
>> For example, I am trying to set up my pyqt5 project using only qmake and 
>> want it to use the command pyrcc5 instead of rcc, and with a few custom 
>> command line arguments.
>> 
>> Thanks!
> 

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


Re: [Interest] Customizing ui/rcc compiler in qmake

2020-04-21 Thread Patrick Stinson
Sorry, I meant uic not rcc.

> On Apr 21, 2020, at 10:14 AM, Patrick Stinson  wrote:
> 
> Is there a way to customize the ui compiler to use a command other than rcc?
> 
> For example, I am trying to set up my pyqt5 project using only qmake and want 
> it to use the command pyrcc5 instead of rcc, and with a few custom command 
> line arguments.
> 
> Thanks!

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


[Interest] Customizing ui/rcc compiler in qmake

2020-04-21 Thread Patrick Stinson
Is there a way to customize the ui compiler to use a command other than rcc?

For example, I am trying to set up my pyqt5 project using only qmake and want 
it to use the command pyrcc5 instead of rcc, and with a few custom command line 
arguments.

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


Re: [Interest] Qml configured but not building on iOS?

2019-10-23 Thread Patrick Stinson
qtdeclarative has not been configured; there is no Makefile.

> On Oct 23, 2019, at 2:53 AM, Kai Köhne  wrote:
> 
> Hi Patrick,
>  
> The config.summary file looks ok – QtQml, QtQuick features are there and 
> there’s also no note that the modules are being skipped.
>  
> Maybe the compilation runs into an error before even entering qtdeclarative? 
> Are you sure that make returned without an error? What happens if you go into 
> qtdeclarative subfolder and run make there?
>  
> Kai
>  
> From: Interest  <mailto:interest-boun...@qt-project.org>> On Behalf Of Patrick Stinson
> Sent: Tuesday, October 22, 2019 7:45 PM
> To: Qt Interest mailto:interest@qt-project.org>>
> Subject: [Interest] Qml configured but not building on iOS?
>  
> QtQml, QtQuick, etc are configured to build but are not being built for iOS. 
> I have attached my config.summary.
> 
> Is there something I am missing?
> 
> Thanks!
> 
> ___
> Interest mailing list
> Interest@qt-project.org <mailto:Interest@qt-project.org>
> https://lists.qt-project.org/listinfo/interest 
> <https://lists.qt-project.org/listinfo/interest>
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] Qml configured but not building on iOS?

2019-10-22 Thread Patrick Stinson
QtQml, QtQuick, etc are configured to build but are not being built for iOS. I 
have attached my config.summary.

Is there something I am missing?

Thanks!



config.summary
Description: Binary data
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QDateTime uses different time zone offset prior to UNIX epoch?

2019-09-21 Thread Patrick Stinson
Ah, I read your response in the forum differently. Thank you.

> On Sep 21, 2019, at 2:18 AM, Christian Ehrlicher  wrote:
> 
> Am 21.09.2019 um 00:12 schrieb Thiago Macieira:
>>> On Friday, 20 September 2019 14:20:40 PDT Patrick Stinson wrote:
>>> QDateTime initializes with a different time zone offset when passed a QDate
>>> before versus after Jan 1 1970. The following line says it all:
>>> 
>>> QDateTime(QDate(1969, 10, 14)).offsetFromUtc() != QDateTime(QDate(1970, 10,
>>> 14)).offsetFromUtc()
>>> 
>>> It seems to me that the offsets for these two QDateTime objects should be
>>> equal. Otherwise, this makes initializing and storing dates difficult.
>>> 
>>> I assume this is intentional. What is the rationale for this design
>>> decision? Is there a workaround?
>> Your test is not reliable. It works for less than half the planet and for 
>> just
>> over half the year.
>> 
>> Anyway, there's no workaround. This is done because the timezone databases 
>> are
>> inaccurate before 1970. So we just return each timezone's standard time, not
>> accounting for DST.
> This is what I told him at the forum - mktime() on windows simply
> returns the wrong dst value for 1969 (but linux does in this case).
> 
> Christian
> ___
> 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] Assertions from QQuickTableView::forceLayout()

2019-09-20 Thread Patrick Stinson
TableView.forceLayout() seems prone to throwing assertions related to internal 
data structures being out of sync with the number of rows and columns from the 
QAbstractTableModel used. Some of these assertions were fixed in 5.13.0, more 
were fixed in 5.13.1. But this one still remains:

items/qquicktableview.cpp:458:void QQuickTableViewPrivate::dumpTable() const(): 
"table cells: (4,0) -> (15,15), item count: 160, table rect: 270,0 x 1040,704"
items/qquicktableview.cpp:477:auto 
QQuickTableViewPrivate::modelIndexAtCell(const QPoint &)::(anonymous 
class)::operator()() const(): output: modelIndex: 915 cell: QPoint(15,0) count: 
915
items/qquicktableview.cpp:477:None(): ASSERT: "(modelIndex < model->count()) || 
[&](){ dumpTable(); qWarning() << "output:" << "modelIndex:" << modelIndex << 
"cell:" << cell << "count:" << model->count(); return false;}()" in file 
items/qquicktableview.cpp, line 477

In many cases this assertion happens when TableView.rows is out of sync with 
model.rowCount(), or TableView.columns is out of sync with model.columnCount(). 
The fact that these are out of sync at all seems to me to be a bug?

At any rate, this isn’t a reliable workaround. This happens most often when 
emitting columnsRemoved() from the model while the column is visible. It never 
occurs when the column is hidden, e.g. scrolled beyond the width of the 
TableView’s viewport.

Is there something I’ve missed about the TableView implementation? Or does it 
just early days yet for this QtQuick Item?

And for what it’s worth, QQuickTableView::dumpTable() was also throwing an 
assertion regarding the GL context not matching when dumping the table to a 
png. I commented out that code block to be able to see the original assertion 
above.

Cheers,
-P___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] ASSERT failure in QCocoaScreen: "The application's primary screen should always be in sync with the main display"

2019-09-20 Thread Patrick Stinson
I received this error after upgrading from 5.13.0 to 5.13.1 and disconnecting 
my external monitor from my latest-model MacBook with Mojave:

qcocoascreen.mm:557:None(): ASSERT failure in QCocoaScreen: "The application's 
primary screen should always be in sync with the main display", file 
qcocoascreen.mm, line 557

It goes away when I plug in my external monitor. Anyone have any idea how to 
fix this? Some kind of app-level cached pref for primary display? It’s not 
possible to continue working while it’s happening.

-Patrick

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


[Interest] QDateTime uses different time zone offset prior to UNIX epoch?

2019-09-20 Thread Patrick Stinson
QDateTime initializes with a different time zone offset when passed a QDate 
before versus after Jan 1 1970. The following line says it all:

QDateTime(QDate(1969, 10, 14)).offsetFromUtc() != QDateTime(QDate(1970, 10, 
14)).offsetFromUtc()

It seems to me that the offsets for these two QDateTime objects should be 
equal. Otherwise, this makes initializing and storing dates difficult.

I assume this is intentional. What is the rationale for this design decision? 
Is there a workaround?

Cheers,
-Patrick

P.S. Here is my original inconclusive entry in the qt forum:
https://forum.qt.io/topic/107005/qdatetime-uses-different-time-zone-offset-prior-to-unix-epoch/6
 




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


Re: [Interest] How to set a non-global context property for a single QQmlComponent?

2019-07-17 Thread Patrick Stinson
Right, I did try that one but if I remember right I got an error setting the 
context property, or that it was the same as the engine root context.

> On Jul 17, 2019, at 3:37 AM, Sérgio Martins  wrote:
> 
>> On 2019-07-17 10:58, Patrick Stinson wrote:
>> Shoot, you know at first pass it looks like that will work. Wow.
>> I wonder if this is possible to do with QQuickWidget? Or if not how to
>> show a component into a QWidget without QQuickWidget?
> 
> A colleague of mine offered a workaround:
> QQmlContext *subContext = 
> QQmlEngine::contextForObject(myQuickWidget.rootObject())
> 
> That should be a subContext already, different from the engine->rootContext()
> 
> Regards,
> Sergio
> 
>>> On Jul 17, 2019, at 1:35 AM, Sérgio Martins  wrote:
>>>> On 2019-07-17 10:15, Patrick Stinson wrote:
>>>> Hello!
>>>> Surely there must be a way to set a context property on a single
>>>> component without having to set it globally on the entire QQmlEngine?
>>>> Indeed, the QQmlContext documentation is silent on this point.
>>>> Help??
>>> Hi,
>>> You can create a child QQmlContext via this constructor [1], and then pass 
>>> it to QQmlComponent::create()
>>> [1] - https://doc.qt.io/qt-5/qqmlcontext.html#QQmlContext-1
>>> Regards,
>>> --
>>> Sérgio Martins | sergio.mart...@kdab.com | Senior Software Engineer
>>> Klarälvdalens Datakonsult AB, a KDAB Group company
>>> Tel: Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
>>> KDAB - The Qt, C++ and OpenGL Experts
> 
> -- 
> Sérgio Martins | sergio.mart...@kdab.com | Senior Software Engineer
> Klarälvdalens Datakonsult AB, a KDAB Group company
> Tel: Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
> KDAB - The Qt, C++ and OpenGL Experts
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] How to set a non-global context property for a single QQmlComponent?

2019-07-17 Thread Patrick Stinson
Is there any way other than QQuickWidget to show a Qml Component in a QWidget?

> On Jul 17, 2019, at 2:14 AM, Sérgio Martins  wrote:
> 
> On 2019-07-17 10:58, Patrick Stinson wrote:
>> Shoot, you know at first pass it looks like that will work. Wow.
>> I wonder if this is possible to do with QQuickWidget? Or if not how to
>> show a component into a QWidget without QQuickWidget?
> 
> 
> According to [1] it's not possible, but could be an easy patch to add to 
> QQuickWidget's API.
> 
> 
> [1] 
> https://code.woboq.org/qt5/qtdeclarative/src/quickwidgets/qquickwidget.cpp.html#1049
> 
> 
> 
>>> On Jul 17, 2019, at 1:35 AM, Sérgio Martins  wrote:
>>> On 2019-07-17 10:15, Patrick Stinson wrote:
>>>> Hello!
>>>> Surely there must be a way to set a context property on a single
>>>> component without having to set it globally on the entire QQmlEngine?
>>>> Indeed, the QQmlContext documentation is silent on this point.
>>>> Help??
>>> Hi,
>>> You can create a child QQmlContext via this constructor [1], and then pass 
>>> it to QQmlComponent::create()
>>> [1] - https://doc.qt.io/qt-5/qqmlcontext.html#QQmlContext-1
> 
> 
> 
> 
> -- 
> Sérgio Martins | sergio.mart...@kdab.com | Senior Software Engineer
> Klarälvdalens Datakonsult AB, a KDAB Group company
> Tel: Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
> KDAB - The Qt, C++ and OpenGL Experts

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


Re: [Interest] How to set a non-global context property for a single QQmlComponent?

2019-07-17 Thread Patrick Stinson
Shoot, you know at first pass it looks like that will work. Wow.

I wonder if this is possible to do with QQuickWidget? Or if not how to show a 
component into a QWidget without QQuickWidget?

> On Jul 17, 2019, at 1:35 AM, Sérgio Martins  wrote:
> 
> On 2019-07-17 10:15, Patrick Stinson wrote:
>> Hello!
>> Surely there must be a way to set a context property on a single
>> component without having to set it globally on the entire QQmlEngine?
>> Indeed, the QQmlContext documentation is silent on this point.
>> Help??
> 
> Hi,
> 
> 
> You can create a child QQmlContext via this constructor [1], and then pass it 
> to QQmlComponent::create()
> 
> 
> 
> [1] - https://doc.qt.io/qt-5/qqmlcontext.html#QQmlContext-1
> 
> Regards,
> -- 
> Sérgio Martins | sergio.mart...@kdab.com | Senior Software Engineer
> Klarälvdalens Datakonsult AB, a KDAB Group company
> Tel: Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
> KDAB - The Qt, C++ and OpenGL Experts

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


[Interest] How to set a non-global context property for a single QQmlComponent?

2019-07-17 Thread Patrick Stinson
Hello!

Surely there must be a way to set a context property on a single component 
without having to set it globally on the entire QQmlEngine? Indeed, the 
QQmlContext documentation is silent on this point.

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


Re: [Interest] Q_ATOMIC_INT64_IS_SUPPORTED: Qt Compile errors on macOS

2019-07-02 Thread Patrick Stinson
Aha! Very interesting. That does seem to make it a user-issue, albeit a very 
convoluted issue.

> On Jul 2, 2019, at 4:08 PM, Thiago Macieira  wrote:
> 
> On Tuesday, 2 July 2019 16:41:30 -03 Patrick Stinson wrote:
>> `rm -rf` on your build does not solve this issue because the .qmake.stash
>> file often exists in a path above the build/source dir.
> 
> That means you ran qmake there, which makes it a build dir.
> 
> You should remove your build dirs.
> 
> -- 
> Thiago Macieira - thiago.macieira (AT) intel.com
>  Software Architect - Intel System Software Products
> 
> 
> 
> ___
> 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


Re: [Interest] Q_ATOMIC_INT64_IS_SUPPORTED: Qt Compile errors on macOS

2019-07-02 Thread Patrick Stinson
`rm -rf` on your build does not solve this issue because the .qmake.stash
file often exists in a path above the build/source dir.

On Wed, Jun 26, 2019 at 5:23 PM Thiago Macieira 
wrote:

> On Wednesday, 26 June 2019 16:22:48 PDT Hamish Moffatt wrote:
> > My point was that the file is entirely managed by qmake, so (IMHO) qmake
> > should deal with it if the data is now stale.
>
> It's very difficult to do that. The whole reason the file exists is to
> avoid
> having to call the compiler to find out its details every time that qmake
> is
> started. In order to do what you are asking for, we need to call out to
> the
> compiler, which defeats the purpose.
>
> Also, changing the compiler does require erasing your build and starting
> over
> anyway. For example, if you're using precompiled headers, a version update
> of
> the compiler (even patch level) can invalidate those files and neither
> qmake
> nor Make will notice that.
>
> My point is that this is a bigger problem than just the .qmake.stash file.
> I
> really recommend just rm -rf your build.
>
> PS: make your life easier and don't configure Qt from inside the sources.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel System Software Products
>
>
>
> ___
> 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


Re: [Interest] Q_ATOMIC_INT64_IS_SUPPORTED: Qt Compile errors on macOS

2019-06-26 Thread Patrick Stinson
Yep, it was a .qmake.stash file two dirs up. I deleted it and everything builds 
fine again.

> On Jun 25, 2019, at 8:03 AM, Thiago Macieira  
> wrote:
> 
> On Tuesday, 25 June 2019 02:51:58 PDT Alexandru Croitor wrote:
>> If the stash file was in higher in the directory tree than you expected, it
>> might have been due to this bug report
>> https://bugreports.qt.io/browse/QTBUG-76140
>> 
>> which should be fixed by
>> https://codereview.qt-project.org/c/qt/qtbase/+/263519
> 
> I have a slightly unusual set up that I configure in qtbase, but then can 
> cd .. and make in the top-level. This isn't supported with the official Qt 
> but 
> used to be sometime before 5.5. My set up remained.
> 
> The intruding .qmake.stash was the one in the top-level. I did rsync from the 
> old machine to the new one, so that might explain how the bad data came to be.
> 
> -- 
> Thiago Macieira - thiago.macieira (AT) intel.com
>  Software Architect - Intel System Software Products
> 
> 
> 
> ___
> 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


Re: [Interest] Q_ATOMIC_INT64_IS_SUPPORTED: Qt Compile errors on macOS

2019-06-23 Thread Patrick Stinson
The qt configure script is predictably unable to find it on the first configure 
run but able to find it on the second run. The ask handy changed. Or were you 
considering that as well?

> On Jun 23, 2019, at 9:07 PM, Thiago Macieira  
> wrote:
> 
>> On Sunday, 23 June 2019 13:23:04 PDT Patrick Stinson wrote:
>> Hmm, what indicates to you that it is a compiler problem? It seems to me
>> that the fact that it (predictably) works unpredictably depending on the
>> state of the Qt conf/build system points more strongly to the problem being
>> in Qt the Qt conf/build system.
> 
> The fact that the compiler failed to find a header that comes from the SDK 
> that comes with the compiler. And that this problem did not happen in older 
> XCode versions (my previous Mac was still High Sierra, which didn't get the 
> latest XCode update).
> 
> -- 
> Thiago Macieira - thiago.macieira (AT) intel.com
>  Software Architect - Intel System Software Products
> 
> 
> 
> ___
> 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


Re: [Interest] Q_ATOMIC_INT64_IS_SUPPORTED: Qt Compile errors on macOS

2019-06-23 Thread Patrick Stinson
Hmm, what indicates to you that it is a compiler problem? It seems to me that 
the fact that it (predictably) works unpredictably depending on the state of 
the Qt conf/build system points more strongly to the problem being in Qt the Qt 
conf/build system.

> On Jun 23, 2019, at 7:59 AM, Thiago Macieira  
> wrote:
> 
>> On Saturday, 22 June 2019 09:50:56 PDT Patrick Stinson wrote:
>> Wow. Very strange. Maybe I should file a bug report, though I bet it will be
>> very low priority.
> 
> To whom? To Qt or to Apple? As far as I can tell, this is a compiler problem.
> 
> -- 
> Thiago Macieira - thiago.macieira (AT) intel.com
>  Software Architect - Intel System Software Products
> 
> 
> 
> ___
> 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


Re: [Interest] Q_ATOMIC_INT64_IS_SUPPORTED: Qt Compile errors on macOS

2019-06-22 Thread Patrick Stinson
Wow. Very strange. Maybe I should file a bug report, though I bet it will be 
very low priority.

> On Jun 22, 2019, at 8:07 AM, Thiago Macieira  
> wrote:
> 
>> On Friday, 21 June 2019 21:50:39 PDT Patrick Stinson wrote:
>> So how do you account for that? Seems very odd to me. This was from a
>> freshly extracted qt source archive.
> 
> I don't know why it happens. But I had a similar situation yesterday setting 
> up my new Mac, with Xcode 10.2. This did not happen on my old one.
> 
> It complained that it couldn't find the GL headers. From the SDK provided by 
> Xcode...
> 
> -- 
> Thiago Macieira - thiago.macieira (AT) intel.com
>  Software Architect - Intel System Software Products
> 
> 
> 
> ___
> 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


Re: [Interest] Q_ATOMIC_INT64_IS_SUPPORTED: Qt Compile errors on macOS

2019-06-21 Thread Patrick Stinson
I am building qt from a couple of different scripts so it would be great to be 
able to have them work on first run.

> On Jun 21, 2019, at 8:50 PM, Patrick Stinson  wrote:
> 
> My config.log did not contain the string “std-atomic64.” It did report that 
> it could not find libatomic. Deleting config.cache and running config.status 
> worked though!
> 
> So how do you account for that? Seems very odd to me. This was from a freshly 
> extracted qt source archive.
> 
>> On Jun 21, 2019, at 12:13 PM, Thiago Macieira  
>> wrote:
>> 
>> On Friday, 21 June 2019 10:35:36 PDT Patrick Stinson wrote:
>>> #define QT_FEATURE_std_atomic64 -1
>> 
>> Can you check the config.log in the top-level dir to see what how the std-
>> atomic64 test failed? If you don't see that in the config.log, remove 
>> config.cache and rerun configure (./config.status)
>> 
>> -- 
>> Thiago Macieira - thiago.macieira (AT) intel.com
>> Software Architect - Intel System Software Products
>> 
>> 
>> 
>> ___
>> 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


Re: [Interest] Q_ATOMIC_INT64_IS_SUPPORTED: Qt Compile errors on macOS

2019-06-21 Thread Patrick Stinson
#define QT_FEATURE_std_atomic64 -1

> On Jun 21, 2019, at 9:32 AM, Thiago Macieira  
> wrote:
> 
>  src/corelib/qtcore-config.h

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


[Interest] Q_ATOMIC_INT64_IS_SUPPORTED: Qt Compile errors on macOS

2019-06-21 Thread Patrick Stinson
(NOTE: I have started a new thread about this from an old one incorrectly 
associating this problem with “make -jn”)

I am having a hard time pinning down the source of this error. I am getting it 
sporadically on Qt-5.12.0 - Qt-5.13.0. using make -jn flags or not using make 
-jn flags doesn’t seem to have an effect. Any ideas?



/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
 -c -include.pch/Qt5Core/c++_x86_64 -pipe -stdlib=libc++ -O3 -fPIC -std=c++1y 
-fapplication-extension  -arch x86_64 -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
 -mmacosx-version-min=10.12 -fvisibility=hidden -fvisibility-inlines-hidden 
-ffunction-sections -fdata-sections -Wall -W -Wobjc-interface-ivars 
-Wobjc-method-access -Wobjc-multiple-method-names -DQT_NO_USING_NAMESPACE 
-DQT_NO_FOREACH -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_CORE_LIB 
-DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT 
-DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS 
-DQT_DISABLE_DEPRECATED_BEFORE=0x05 -D_LARGEFILE64_SOURCE 
-D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DPCRE2_CODE_UNIT_WIDTH=16 -I. 
-I../3rdparty/zlib/src -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 
-I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty 
-I../3rdparty/double-conversion/include 
-I../3rdparty/double-conversion/include/double-conversion -I../3rdparty/forkfd 
-I../3rdparty/tinycbor/src -I../../include -I../../include/QtCore 
-I../../include/QtCore/5.13.0 -I../../include/QtCore/5.13.0/QtCore -I.moc 
-I.tracegen -I../3rdparty/pcre2/src 
-I/Users/patrick/dev/vendor/sysroot-masos-64/include -I../../mkspecs/macx-clang 
-o .obj/qatomic.o thread/qatomic.cpp
thread/qatomic.cpp:1624:4: error: "Q_ATOMIC_INT64_IS_SUPPORTED must be defined 
on a 64-bit platform"
#  error "Q_ATOMIC_INT64_IS_SUPPORTED must be defined on a 64-bit platform"
   ^
In file included from thread/qatomic.cpp:1:
In file included from 
/Users/patrick/dev/vendor/sysroot-masos-64/build/qt-everywhere-src-5.13.0/qtbase/src/corelib/global/qt_pch.h:56:
In file included from 
../../include/QtCore/../../src/corelib/global/qglobal.h:1224:
In file included from 
/Users/patrick/dev/vendor/sysroot-masos-64/build/qt-everywhere-src-5.13.0/qtbase/src/corelib/../../include/QtCore/qatomic.h:1:
In file included from thread/qatomic.h:46:
In file included from 
/Users/patrick/dev/vendor/sysroot-masos-64/build/qt-everywhere-src-5.13.0/qtbase/src/corelib/../../include/QtCore/qbasicatomic.h:1:
/Users/patrick/dev/vendor/sysroot-masos-64/build/qt-everywhere-src-5.13.0/qtbase/src/corelib/../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:97:5:
 error: static_assert failed due to requirement 
'bool(QAtomicOpsSupport::IsSupported)' "template parameter is an 
integral of a size not supported on this platform"
Q_STATIC_ASSERT_X(QAtomicOpsSupport::IsSupported, "template 
parameter is an integral of a size not supported on this platform");

^~
../../include/QtCore/../../src/corelib/global/qglobal.h:121:49: note: expanded 
from macro 'Q_STATIC_ASSERT_X'
#  define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), 
Message)
^ ~~~
thread/qatomic.h:55:31: note: in instantiation of template class 
'QBasicAtomicInteger' requested here
class QAtomicInteger : public QBasicAtomicInteger
  ^
thread/qatomic.cpp:1631:17: note: in instantiation of template class 
'QAtomicInteger' requested here
Q_STATIC_ASSERT(sizeof(QAtomicInteger));
^
In file included from thread/qatomic.cpp:1:
In file included from 
/Users/patrick/dev/vendor/sysroot-masos-64/build/qt-everywhere-src-5.13.0/qtbase/src/corelib/global/qt_pch.h:56:
In file included from 
../../include/QtCore/../../src/corelib/global/qglobal.h:1224:
In file included from 
/Users/patrick/dev/vendor/sysroot-masos-64/build/qt-everywhere-src-5.13.0/qtbase/src/corelib/../../include/QtCore/qatomic.h:1:
In file included from thread/qatomic.h:46:
In file included from 
/Users/patrick/dev/vendor/sysroot-masos-64/build/qt-everywhere-src-5.13.0/qtbase/src/corelib/../../include/QtCore/qbasicatomic.h:1:
/Users/patrick/dev/vendor/sysroot-masos-64/build/qt-everywhere-src-5.13.0/qtbase/src/corelib/../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:97:5:
 error: static_assert failed due to requirement 
'bool(QAtomicOpsSupport::IsSupported)' "template 
parameter is an integral of a size not supported on this platform"
Q_STATIC_ASSERT_X(QAtomicOpsSupport::IsSupported, "template 
parameter is an integral of a size not supported on this platform");


Re: [Interest] Qt-5.12.3: Compile errors passing -j to make on macos

2019-06-15 Thread Patrick Stinson
Hmm, seems that some of these errors were actually a part of my local shell ENV 
which sets the following variables (the SYSROOT dir was empty, though):

export SYSROOT=$HOME/dev/vendor/sysroot-dev
export DYLD_LIBRARY_PATH=$SYSROOT/lib
export PATH=$SYSROOT/bin:$SYSROOT/qt/bin:$PATH
export PYTHONPATH=~/dev/pkdiagram:~/dev/pkdiagram/server

The build worked if I waited until after the qt build to set everything but 
SYSROOT.

This is pretty strange, but I’ll drop this for now.

> On Jun 15, 2019, at 10:42 AM, Thiago Macieira  
> wrote:
> 
> On Saturday, 15 June 2019 00:52:44 PDT Patrick Stinson wrote:
>> thread/qatomic.cpp:1624:4: error: "Q_ATOMIC_INT64_IS_SUPPORTED must be
>> defined on a 64-bit platform"
> 
> And this same build works without -j?
> 
> Can you try it with -no-pch and see if it makes a difference?
> 
> -- 
> Thiago Macieira - thiago.macieira (AT) intel.com
>  Software Architect - Intel System Software Products
> 
> 
> 
> ___
> 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


Re: [Interest] Qt-5.12.3: Compile errors passing -j to make on macos

2019-06-15 Thread Patrick Stinson
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
 -c -include.pch/Qt5Core_debug/c++_x86_64 -pipe -stdlib=libc++ -g -std=c++1y 
-fapplication-extension  -arch x86_64 -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
 -mmacosx-version-min=10.12 -fvisibility=hidden -fvisibility-inlines-hidden 
-Wall -W -Wobjc-interface-ivars -Wobjc-method-access 
-Wobjc-multiple-method-names -fPIC -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH 
-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT 
-DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT 
-DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS 
-DQT_DISABLE_DEPRECATED_BEFORE=0x05 -D_LARGEFILE64_SOURCE 
-D_LARGEFILE_SOURCE -DPCRE2_CODE_UNIT_WIDTH=16 -I. -I../3rdparty/zlib/src 
-Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 
-I../3rdparty/sha3 -I../3rdparty -I../3rdparty/double-conversion/include 
-I../3rdparty/double-conversion/include/double-conversion -I../3rdparty/forkfd 
-I../3rdparty/tinycbor/src -I../../include -I../../include/QtCore 
-I../../include/QtCore/5.12.3 -I../../include/QtCore/5.12.3/QtCore -I.moc 
-I.tracegen -I../3rdparty/pcre2/src -I../../mkspecs/macx-clang -o 
.obj/qatomic.o thread/qatomic.cpp
thread/qatomic.cpp:1624:4: error: "Q_ATOMIC_INT64_IS_SUPPORTED must be defined 
on a 64-bit platform"
#  error "Q_ATOMIC_INT64_IS_SUPPORTED must be defined on a 64-bit platform"
   ^
In file included from thread/qatomic.cpp:1:
In file included from 
/Users/patrick/dev/vendor/sysroot-dev/build/qt-everywhere-src-5.12.3/qtbase/src/corelib/global/qt_pch.h:56:
In file included from 
../../include/QtCore/../../src/corelib/global/qglobal.h:1210:
In file included from 
/Users/patrick/dev/vendor/sysroot-dev/build/qt-everywhere-src-5.12.3/qtbase/src/corelib/../../include/QtCore/qatomic.h:1:
In file included from thread/qatomic.h:46:
In file included from 
/Users/patrick/dev/vendor/sysroot-dev/build/qt-everywhere-src-5.12.3/qtbase/src/corelib/../../include/QtCore/qbasicatomic.h:1:
/Users/patrick/dev/vendor/sysroot-dev/build/qt-everywhere-src-5.12.3/qtbase/src/corelib/../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:97:5:
 error: static_assert failed due to requirement
  'bool(QAtomicOpsSupport::IsSupported)' "template parameter 
is an integral of a size not supported on this platform"
Q_STATIC_ASSERT_X(QAtomicOpsSupport::IsSupported, "template 
parameter is an integral of a size not supported on this platform");

^~
../../include/QtCore/../../src/corelib/global/qglobal.h:121:49: note: expanded 
from macro 'Q_STATIC_ASSERT_X'
#  define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), 
Message)
^ ~~~
thread/qatomic.h:55:31: note: in instantiation of template class 
'QBasicAtomicInteger' requested here
class QAtomicInteger : public QBasicAtomicInteger
  ^
thread/qatomic.cpp:1631:17: note: in instantiation of template class 
'QAtomicInteger' requested here
Q_STATIC_ASSERT(sizeof(QAtomicInteger));
^


> On Jun 14, 2019, at 11:49 PM, Patrick Stinson  wrote:
> 
> Has anyone else run into compile errors related to integer sizes on a 64 bit 
> platform when passing -jn to make on macos? A build will be preceding just 
> fine with one process, but when I increase the number it immediately bails 
> with compile errors.
> 
> Thanks!

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


[Interest] Qt-5.12.3: Compile errors passing -j to make on macos

2019-06-15 Thread Patrick Stinson
Has anyone else run into compile errors related to integer sizes on a 64 bit 
platform when passing -jn to make on macos? A build will be preceding just fine 
with one process, but when I increase the number it immediately bails with 
compile errors.

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


[Interest] Animating viewable rect of QGraphicsView

2019-02-25 Thread Patrick Stinson
How can I animate the viewable scene rect of a QGraphicsView using screen 
coordinates? This means animating both center pos and scale. This is similar to 
Google Earth where the map scrolls and zooms smoothly from one point to 
another. I have searched for an answer for this several times in the last 
couple of years with little success.

The use case is that I use QGraphicsView::fitInView to show the bounding rect 
of all visible items. Then some items are hidden and I want to animate 
zooming/scrolling to fit the new bounding rect of all the items.

Simply setting up one animation to periodically call QGraphicsView::centerOn() 
and another to call QGraphicsView::scale() doesn't work because calling one 
displaces the values of the other as the interpolation progresses.

Thoughts? This seems like a pretty essential use case for QGraphicsView.

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


[Interest] QListView ignoring ScrollPerPixel on Sierra, High Sierra (Qt-5.12.0)

2019-02-17 Thread Patrick Stinson
Hi there!

This simple pyqt example demonstrates the problem. Any ideas on a workaround?


import time

app = QApplication(sys.argv)

w = QListView()
m = QStringListModel()
m.setStringList([str(time.time()) for i in range(1000)])
w.setModel(m)
w.setVerticalScrollMode(QAbstractItemView.ScrollPerPixel)
w.show()

app.exec_()




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


Re: [Interest] How to get active button color in macOS?

2019-01-30 Thread Patrick Stinson
That was also my estimation. I decided to go with native code:


#ifdef Q_OS_MACOS
QColor qt_mac_toQColor(const NSColor *color) const
{
QColor qtColor;
NSString *colorSpace = [color colorSpaceName];
if (colorSpace == NSDeviceCMYKColorSpace) {
CGFloat cyan, magenta, yellow, black, alpha;
[color getCyan: magenta: yellow: black: 
alpha:];
qtColor.setCmykF(cyan, magenta, yellow, black, alpha);
} else {
NSColor *tmpColor;
tmpColor = [color colorUsingColorSpaceName:NSDeviceRGBColorSpace];
CGFloat red, green, blue, alpha;
[tmpColor getRed: green: blue: alpha:];
qtColor.setRgbF(red, green, blue, alpha);
}
return qtColor;
}
#endif


QColor appleControlAccentColor() const {
if (@available(macOS 10.14, *)) {
// macOS 10.14 or later code path   


return qt_mac_toQColor([NSColor controlAccentColor]);
} else {

   
return QApplication::palette().color(QPalette::Active, 
QPalette::ButtonText);
}
}




> On Jan 30, 2019, at 2:53 AM, Nils Jeisecke  
> wrote:
> 
> Hi,
> 
> Am 30.01.2019 um 02:27 hat Patrick Stinson geschrieben:
>> Hello!
>> 
>> I am trying to figure out how to get the following color for macOS
>> (see screenshot) which is called “Accent Color" in the General section
>> of System Preferences.
> 
> I'm afraid there's only the "highlight" color available (which is derived
> from the accent color by default but can be changed). You can use native
> API to get the accent color.
> 
> Qt palette is kind of stuck at representing Windows 95 like UIs, it has
> even color values for drawing fancy grayish 3D buttons ;-)
> 
> Given that Windows 10 also has some kind of accent color I would welcome
> an additional palette entry. This could be the same value as highlight
> on platforms that don't support accent colors.
> 
> On systems with accent color support usually the "accent color" is
> used for list selection, toggles, checkboxes and control indicator
> styling (like the open button of a combobox). "highlight" is meant for
> user selection in input fields etc.
> 
> I'm not sure if adding another color entry is possible in Qt5 though.
> 
> Nils

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


Re: [Interest] Strange unresolved external symbols in QtCore on windows

2018-11-06 Thread Patrick Stinson
The project linked OK without it, so well see how it goes once I fox this 
plethora of other problems actually getting it running.

> On Nov 6, 2018, at 12:51 AM, Alexandru Croitor  
> wrote:
> 
> I haven't looked at the error messages, but I think 
> 
> "#define protected public"
> 
> is used by PyQt5 / sip source code to allow overriding protected methods from 
> Python derived classes.
> 
> I don't know if they have support for disabling it.
> 
> 
> 
>> On 4. Nov 2018, at 06:45, Patrick Stinson  wrote:
>> 
>> Looks like the only instances of that string are in tests. And only three. 
>> So that can’t be it.
>> 
>>> On Nov 3, 2018, at 8:54 PM, Patrick Stinson  wrote:
>>> 
>>> Woah. Any idea what this is all about?
>>> 
>>>> On Nov 3, 2018, at 8:41 PM, Thiago Macieira  
>>>> wrote:
>>>> 
>>>> On Saturday, 3 November 2018 14:31:12 PDT Patrick Stinson wrote:
>>>>> The output of dumpbin /symbols /linenumbers Qt5Core.lib shows these 
>>>>> symbols
>>>>> as protected, not public as referenced above
>>>> 
>>>> That is correct. They are protected.
>>>> 
>>>> Search your sources for a 
>>>> 
>>>> #define protected public
>>>> 
>>>> Find it and remove it.
>>>> 
>>>> -- 
>>>> Thiago Macieira - thiago.macieira (AT) intel.com
>>>> Software Architect - Intel Open Source Technology Center
>>>> 
>>>> 
>>>> 
>>>> ___
>>>> 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] Strange unresolved external symbols in QtCore on windows

2018-11-04 Thread Patrick Stinson
Looks like the only instances of that string are in tests. And only three. So 
that can’t be it.

> On Nov 3, 2018, at 8:54 PM, Patrick Stinson  wrote:
> 
> Woah. Any idea what this is all about?
> 
>> On Nov 3, 2018, at 8:41 PM, Thiago Macieira  
>> wrote:
>> 
>> On Saturday, 3 November 2018 14:31:12 PDT Patrick Stinson wrote:
>>> The output of dumpbin /symbols /linenumbers Qt5Core.lib shows these symbols
>>> as protected, not public as referenced above
>> 
>> That is correct. They are protected.
>> 
>> Search your sources for a 
>> 
>> #define protected public
>> 
>> Find it and remove it.
>> 
>> -- 
>> Thiago Macieira - thiago.macieira (AT) intel.com
>> Software Architect - Intel Open Source Technology Center
>> 
>> 
>> 
>> ___
>> 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] Strange unresolved external symbols in QtCore on windows

2018-11-03 Thread Patrick Stinson
Woah. Any idea what this is all about?

> On Nov 3, 2018, at 8:41 PM, Thiago Macieira  wrote:
> 
> On Saturday, 3 November 2018 14:31:12 PDT Patrick Stinson wrote:
>> The output of dumpbin /symbols /linenumbers Qt5Core.lib shows these symbols
>> as protected, not public as referenced above
> 
> That is correct. They are protected.
> 
> Search your sources for a 
> 
> #define protected public
> 
> Find it and remove it.
> 
> -- 
> Thiago Macieira - thiago.macieira (AT) intel.com
>  Software Architect - Intel Open Source Technology Center
> 
> 
> 
> ___
> 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] Strange unresolved external symbols in QtCore on windows

2018-11-03 Thread Patrick Stinson
My qmake-generated Visual studio project is complaining about the following 
QObject symbols referenced from my QObject subclass even though I am linking to 
Qt5Core.lib using a qt I built from the command line:


1>CUtil.obj : error LNK2001: unresolved external symbol "public: virtual void 
__thiscall QObject::timerEvent(class QTimerEvent *)" 
(?timerEvent@QObject@@UAEXPAVQTimerEvent@@@Z)
1>CUtil_win32.obj : error LNK2001: unresolved external symbol "public: virtual 
void __thiscall QObject::timerEvent(class QTimerEvent *)" 
(?timerEvent@QObject@@UAEXPAVQTimerEvent@@@Z)
1>sip_cutilAppFilter.obj : error LNK2001: unresolved external symbol "public: 
virtual void __thiscall QObject::timerEvent(class QTimerEvent *)" 
(?timerEvent@QObject@@UAEXPAVQTimerEvent@@@Z)
1>CUtil.obj : error LNK2001: unresolved external symbol "public: virtual void 
__thiscall QObject::childEvent(class QChildEvent *)" 
(?childEvent@QObject@@UAEXPAVQChildEvent@@@Z)
1>CUtil_win32.obj : error LNK2001: unresolved external symbol "public: virtual 
void __thiscall QObject::childEvent(class QChildEvent *)" 
(?childEvent@QObject@@UAEXPAVQChildEvent@@@Z)
1>sip_cutilAppFilter.obj : error LNK2001: unresolved external symbol "public: 
virtual void __thiscall QObject::childEvent(class QChildEvent *)" 
(?childEvent@QObject@@UAEXPAVQChildEvent@@@Z)
1>CUtil.obj : error LNK2001: unresolved external symbol "public: virtual void 
__thiscall QObject::customEvent(class QEvent *)" 
(?customEvent@QObject@@UAEXPAVQEvent@@@Z)
1>CUtil_win32.obj : error LNK2001: unresolved external symbol "public: virtual 
void __thiscall QObject::customEvent(class QEvent *)" 
(?customEvent@QObject@@UAEXPAVQEvent@@@Z)
1>sip_cutilAppFilter.obj : error LNK2001: unresolved external symbol "public: 
virtual void __thiscall QObject::customEvent(class QEvent *)" 
(?customEvent@QObject@@UAEXPAVQEvent@@@Z)
1>CUtil.obj : error LNK2001: unresolved external symbol "public: virtual void 
__thiscall QObject::connectNotify(class QMetaMethod const &)" 
(?connectNotify@QObject@@UAEXABVQMetaMethod@@@Z)
1>CUtil_win32.obj : error LNK2001: unresolved external symbol "public: virtual 
void __thiscall QObject::connectNotify(class QMetaMethod const &)" 
(?connectNotify@QObject@@UAEXABVQMetaMethod@@@Z)
1>sip_cutilAppFilter.obj : error LNK2001: unresolved external symbol "public: 
virtual void __thiscall QObject::connectNotify(class QMetaMethod const &)" 
(?connectNotify@QObject@@UAEXABVQMetaMethod@@@Z)
1>CUtil.obj : error LNK2001: unresolved external symbol "public: virtual void 
__thiscall QObject::disconnectNotify(class QMetaMethod const &)" 
(?disconnectNotify@QObject@@UAEXABVQMetaMethod@@@Z)
1>CUtil_win32.obj : error LNK2001: unresolved external symbol "public: virtual 
void __thiscall QObject::disconnectNotify(class QMetaMethod const &)" 
(?disconnectNotify@QObject@@UAEXABVQMetaMethod@@@Z)
1>sip_cutilAppFilter.obj : error LNK2001: unresolved external symbol "public: 
virtual void __thiscall QObject::disconnectNotify(class QMetaMethod const &)" 
(?disconnectNotify@QObject@@UAEXABVQMetaMethod@@@Z)


The output of dumpbin /symbols /linenumbers Qt5Core.lib shows these symbols as 
protected, not public as referenced above


516  UNDEF  notype ()External | 
?timerEvent@QObject@@MAEXPAVQTimerEvent@@@Z (protected: virtual void __thiscall 
QObject::timerEvent(class QTimerEvent *))
517  UNDEF  notype ()External | 
?childEvent@QObject@@MAEXPAVQChildEvent@@@Z (protected: virtual void __thiscall 
QObject::childEvent(class QChildEvent *))


But then, maybe the public/private status of these isn’t the problem.

Anyone have any idea what might be causing this? Here is my linker command line:


OUT:"release\\Family Diagram.exe" /MANIFEST /NXCOMPAT /PDB:"release\Family 
Diagram.pdb" /DYNAMICBASE "Y:\dev\vendor\sysroot-win-32\qt\lib\qtmain.lib" 
"Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5\Qt.lib" 
"Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5\QtCore.lib" 
"Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5\QtGui.lib" 
"Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5\QtLocation.lib" 
"Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5\QtNetwork.lib" 
"Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5\QtPositioning.lib"
 
"Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5\QtPrintSupport.lib"
 
"Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5\QtPurchasing.lib"
 "Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5\QtQml.lib" 
"Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5\QtQuick.lib" 
"Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5\QtQuickWidgets.lib"
 "Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5\QtWidgets.lib" 
"Y:\dev\vendor\sysroot-win-32\lib\python36.lib" 
"Y:\dev\vendor\sysroot-win-32\lib\python3.6\site-packages\PyQt5\sip.lib" 

[Interest] Can't install Qt-5.11.2 on latest Windows 10

2018-10-17 Thread Patrick Stinson
Hello! I can’t seem to find any way to install qt-5.11.2 on Windows 10 from 
either the online installer or the all-in-one open source installer. Surely 
this isn’t happening for everyone?

I am getting installer errors as in this bug report:

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


Does anyone know a workaround for this?

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


Re: [Interest] **SPAM**d Re: Setting current item text color via stylesheet in QTableView for SelectRows

2018-08-12 Thread Patrick Stinson
It does work for me as well. I was just having trouble getting it to work with 
the default background color for selected items and white for selected+current.

I wonder why this isn’t default..

> On Aug 12, 2018, at 10:01 PM, Reinhardt Behm  wrote:
> 
> Hi Patrick,
> 
> it works for me with this style.
> 
> The attached picture show two selected rows (0 and 2) and one current, 
> unselected cell (1).
> 
> -- 
> Best Regards
> 
> Reinhardt Behm
> 
> 
>> On Sunday 12 August 2018 21:06:28 Patrick Stinson wrote:
>> Don’t forget to reply to all.
>> 
>> Your example is interesting, and it does solve the problem of making the
>> selected and current item stand out. I suppose there isn’t a way to do this
>> and also show the current item when it is not selected.
>> 
>> How strange that you can’t combine selectors as in CSS.
>> 
>>> On Aug 12, 2018, at 8:42 PM, Reinhardt Behm  wrote:
>>> 
>>> QTableView::item
>>> { color:black; background-color:white; }
>>> QTableView::item:selected
>>> { color:green; }
>>> QTableView::item:focus
>>> { color:blue;  }
> 
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Setting current item text color via stylesheet in QTableView for SelectRows

2018-08-12 Thread Patrick Stinson
Don’t forget to reply to all.

Your example is interesting, and it does solve the problem of making the 
selected and current item stand out. I suppose there isn’t a way to do this and 
also show the current item when it is not selected.

How strange that you can’t combine selectors as in CSS.


> On Aug 12, 2018, at 8:42 PM, Reinhardt Behm  wrote:
> 
> QTableView::item
> { color:black; background-color:white; }
> QTableView::item:selected
> { color:green; }
> QTableView::item:focus
> { color:blue;  }

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


Re: [Interest] Setting current item text color via stylesheet in QTableView for SelectRows

2018-08-11 Thread Patrick Stinson
It’s like there needs to be an extra rule to honor the selected and focus 
states simultaneously, but ::item:selected:focus doesn’t work.

> On Aug 10, 2018, at 12:11 PM, Patrick Stinson  wrote:
> 
> Negative. “current” is not a valid pseudo state, as “focus” is the 
> appropriate pseudo state for the current item.
> 
>> On Aug 9, 2018, at 6:15 PM, Reinhardt Behm  wrote:
>> 
>> Hi Patrick,
>> 
>> how about:
>> QTableView::item:selected
>> { color:green; }
>> QTableView::item:current
>> { color:yellow; }
>> 
>> -- 
>> Best Regards
>> 
>> Reinhardt Behm
>> 
>>> On Thursday 09 August 2018 10:34:38 you wrote:
>>> Thanks again. Actually, what I am trying to do is differentiate between
>>> current and selected items so that I can tell which item is current within
>>> the selected row. For example, the following paints all selected items with
>>> the same text color so you don’t know which one is selected:
>>> 
>>> QTableView::item:focus {
>>>color: yellow;
>>> }
>>> 
>>>> On Aug 7, 2018, at 11:31 PM, Reinhardt Behm  wrote:
>>>> 
>>>> Hi Patrick,
>>>> 
>>>> as I understood you, you want to style a row in a table view. When it is
>>>> selected and and current.
>>>> 
>>>> I would do it like
>>>> TableView::item:selected, TableView::item:current
>>>> { color:ugly-green; }
>>>> 
>>>> This is untested.
>>>> 
>>>>> Thanks again, but I still don’t think you have answered the question.
>>>>> 
>>>>>> On Aug 7, 2018, at 10:22 PM, Reinhardt Behm  wrote:
>>>>>> 
>>>>>> You can combine attributes:
>>>>>> 
>>>>>> If needed, logical OR can be expressed using the comma operator:
>>>>>> QCheckBox:hover, QCheckBox:checked { color: white }
>>>>>> 
>>>>>>> On Tuesday 07 August 2018 20:54:58 you wrote:
>>>>>>> Thanks for your reply, Reinhardt. Your code acknowledges the selected
>>>>>>> item
>>>>>>> but I am looking for the current item whether it is selected or not.
>>>>>>> 
>>>>>>> -Patrick
>>>>>>> 
>>>>>>>> On Aug 7, 2018, at 6:00 PM, Reinhardt Behm via Interest
>>>>>>>>  wrote:>
>>>>>>>> 
>>>>>>>>> On Tuesday 07 August 2018 16:31:42 Patrick Stinson wrote:
>>>>>>>>> Hello!
>>>>>>>>> 
>>>>>>>>> I have a vanilla QTableView with SingleSelection and SelectRows and
>>>>>>>>> am
>>>>>>>>> trying to figure out how to set the text color of the current item
>>>>>>>>> for
>>>>>>>>> both
>>>>>>>>> when the row is selected and when it isn’t. This is important so that
>>>>>>>>> the
>>>>>>>>> user knows which cell will be edited when they hit the enter key and
>>>>>>>>> so
>>>>>>>>> they can navigate to a new cell using the arrow keys.
>>>>>>>>> 
>>>>>>>>> It seems that the following will do it, but it doesn’t apply when the
>>>>>>>>> row
>>>>>>>>> is selected.
>>>>>>>>> 
>>>>>>>>> QTableView::item:focus {
>>>>>>>>> 
>>>>>>>>> color: yellow;
>>>>>>>>> 
>>>>>>>>> }
>>>>>>>>> 
>>>>>>>>> How can this be done?
>>>>>>>>> 
>>>>>>>>> Thanks!
>>>>>>>>> -Patrick
>>>>>>>> 
>>>>>>>> Here something is used in a similar case
>>>>>>>> 
>>>>>>>> TableViewBase {
>>>>>>>> 
>>>>>>>>  font-size: 18px; font-weight: bold;
>>>>>>>>  background-color: white;
>>>>>>>> 
>>>>>>>> }
>>>>>>>> TableViewBase::item {
>>>>>>>> 
>>>>>>>>  color: black;
>>>>>>>>  font-size: 18px; font-weight: bold;
>>>>>>>>  background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop:
>>>>>>>>  0
>>>>>>>> 
>>>>>>>> #f6f7fa, stop: 1 #dadbde);
>>>>>>>> }
>>>>>>>> TableViewBase::item:selected {
>>>>>>>> 
>>>>>>>>  color: white;
>>>>>>>>  background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop:
>>>>>>>>  0
>>>>>>>> 
>>>>>>>> #606060, stop: 1 #00);
>>>>>>>> }
> 
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Setting current item text color via stylesheet in QTableView for SelectRows

2018-08-10 Thread Patrick Stinson
Negative. “current” is not a valid pseudo state, as “focus” is the appropriate 
pseudo state for the current item.

> On Aug 9, 2018, at 6:15 PM, Reinhardt Behm  wrote:
> 
> Hi Patrick,
> 
> how about:
> QTableView::item:selected
> { color:green; }
> QTableView::item:current
> { color:yellow; }
> 
> -- 
> Best Regards
> 
> Reinhardt Behm
> 
> On Thursday 09 August 2018 10:34:38 you wrote:
>> Thanks again. Actually, what I am trying to do is differentiate between
>> current and selected items so that I can tell which item is current within
>> the selected row. For example, the following paints all selected items with
>> the same text color so you don’t know which one is selected:
>> 
>> QTableView::item:focus {
>>color: yellow;
>> }
>> 
>>> On Aug 7, 2018, at 11:31 PM, Reinhardt Behm  wrote:
>>> 
>>> Hi Patrick,
>>> 
>>> as I understood you, you want to style a row in a table view. When it is
>>> selected and and current.
>>> 
>>> I would do it like
>>> TableView::item:selected, TableView::item:current
>>> { color:ugly-green; }
>>> 
>>> This is untested.
>>> 
>>>> Thanks again, but I still don’t think you have answered the question.
>>>> 
>>>>> On Aug 7, 2018, at 10:22 PM, Reinhardt Behm >>>> <mailto:rb...@hushmail.com>> wrote:
>>>>> 
>>>>> You can combine attributes:
>>>>> 
>>>>> If needed, logical OR can be expressed using the comma operator:
>>>>> QCheckBox:hover, QCheckBox:checked { color: white }
>>>>> 
>>>>>> On Tuesday 07 August 2018 20:54:58 you wrote:
>>>>>> Thanks for your reply, Reinhardt. Your code acknowledges the selected
>>>>>> item
>>>>>> but I am looking for the current item whether it is selected or not.
>>>>>> 
>>>>>> -Patrick
>>>>>> 
>>>>>>> On Aug 7, 2018, at 6:00 PM, Reinhardt Behm via Interest
>>>>>>> mailto:interest@qt-project.org>> wrote:>
>>>>>>> 
>>>>>>> On Tuesday 07 August 2018 16:31:42 Patrick Stinson wrote:
>>>>>>>> Hello!
>>>>>>>> 
>>>>>>>> I have a vanilla QTableView with SingleSelection and SelectRows and
>>>>>>>> am
>>>>>>>> trying to figure out how to set the text color of the current item
>>>>>>>> for
>>>>>>>> both
>>>>>>>> when the row is selected and when it isn’t. This is important so that
>>>>>>>> the
>>>>>>>> user knows which cell will be edited when they hit the enter key and
>>>>>>>> so
>>>>>>>> they can navigate to a new cell using the arrow keys.
>>>>>>>> 
>>>>>>>> It seems that the following will do it, but it doesn’t apply when the
>>>>>>>> row
>>>>>>>> is selected.
>>>>>>>> 
>>>>>>>> QTableView::item:focus {
>>>>>>>> 
>>>>>>>> color: yellow;
>>>>>>>> 
>>>>>>>> }
>>>>>>>> 
>>>>>>>> How can this be done?
>>>>>>>> 
>>>>>>>> Thanks!
>>>>>>>> -Patrick
>>>>>>> 
>>>>>>> Here something is used in a similar case
>>>>>>> 
>>>>>>> TableViewBase {
>>>>>>> 
>>>>>>>  font-size: 18px; font-weight: bold;
>>>>>>>  background-color: white;
>>>>>>> 
>>>>>>> }
>>>>>>> TableViewBase::item {
>>>>>>> 
>>>>>>>  color: black;
>>>>>>>  font-size: 18px; font-weight: bold;
>>>>>>>  background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop:
>>>>>>>  0
>>>>>>> 
>>>>>>> #f6f7fa, stop: 1 #dadbde);
>>>>>>> }
>>>>>>> TableViewBase::item:selected {
>>>>>>> 
>>>>>>>  color: white;
>>>>>>>  background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop:
>>>>>>>  0
>>>>>>> 
>>>>>>> #606060, stop: 1 #00);
>>>>>>> }

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


Re: [Interest] How to change parent of scaled QGraphicsItem while retaining scene bounding rect?

2018-08-08 Thread Patrick Stinson
I got a little further, this snippet works when the parent items don’t have a 
scale set. But when the parents do have a scale set the child item’s position 
jumps around a bit when changing parents.

def setParent(parent):
if parent == child.parentItem():
return

if not child.parentItem() and parent:
st = child.sceneTransform() # I assume even if the child has a 
parent. 
   
inverted, ok = parent.sceneTransform().inverted()
lt = inverted * st
elif child.parentItem() and not parent:
lt = child.sceneTransform()
elif child.parentItem() and parent:
st = child.sceneTransform()
inverted, ok = parent.sceneTransform().inverted()
lt = inverted * st
child.setTransform(lt)
child.setScale(1.0)
child.setRotation(0.0)
child.setParentItem(parent)

> On Aug 8, 2018, at 10:42 AM, Patrick Stinson  wrote:
> 
> Thanks for that. Though I am having some trouble. If you have PyQt, I wonder 
> what problem you see with this example:
> 
> def tests_QGI_parent_transform():
> app = QApplication(sys.argv)
> view = QGraphicsView()
> 
> scene = QGraphicsScene()
> rect = QRectF(-50.0, -50.0, 100.0, 100.0)
> 
> parentA = QGraphicsRectItem(rect) # red   
>   
>   
> 
> parentA.setPos(-100, -100)
> parentA.setScale(.5)
> parentA.setPen(Qt.red)
> scene.addItem(parentA)
> 
> parentB = QGraphicsRectItem(rect) # blue  
>   
>   
> 
> parentB.setPos(100, 100)
> parentB.setScale(1.0)
> parentB.setPen(Qt.blue)
> scene.addItem(parentB)
> 
> child = QGraphicsRectItem(rect) # green   
>   
>   
> 
> child.setPos(-100, 100)
> child.setPen(Qt.green)
> scene.addItem(child)
> view.setScene(scene)
> 
> buttonParent = QWidget(view)
> parentAButton = QPushButton('Set Parent A', buttonParent)
> parentBButton = QPushButton('Set Parent B', buttonParent)
> noParentButton = QPushButton('Set No Parent', buttonParent)
> ButtonLayout = QVBoxLayout(buttonParent)
> ButtonLayout.addWidget(parentAButton)
> ButtonLayout.addWidget(parentBButton)
> ButtonLayout.addWidget(noParentButton)
> buttonParent.move(10, 10)
> def setParent(parent):
> if parent == child.parentItem():
> return
> sceneTransform = child.sceneTransform() # I assume even if the child 
> has a parent. 
>   
>  
> if parent:
> inverted, ok = parent.sceneTransform().inverted()
> localTransform = inverted * sceneTransform
> print(parent.pen().color().name())
> else:
> localTransform = sceneTransform
> child.setTransform(localTransform)
> child.setScale(1.0)
> child.setRotation(0.0)
> child.setParentItem(parent)
> parentAButton.clicked.connect(lambda: setParent(parentA))
> parentBButton.clicked.connect(lambda: setParent(parentB))
> noParentButton.clicked.connect(lambda: setParent(None))
> 
> view.resize(800, 600)
> r = scene.itemsBoundingRect()
> sceneRect = r.marginsAdded(QMarginsF(r.x() * 2,
>  r.y() * 2,
>  r.width() * 2,
>  r.height() * 2))
> view.fitInView(sceneRect)
> view.centerOn(0, 0)
> view.show()
> app.exec()
> 
> 
> tests_QGI_parent_transform()
> 
> 
> 
> 
>> On Aug 7, 2018, at 10:05 PM, Christian Gagneraud > <mailto:chg...@gmail.com>> wrote:
>> 
>> On 8 August 2018 at 15:49, Patrick Stinson > <mailto:patrickk...@gmail.com>> wrote:
>>> Thanks for the reply. I am just particularly dense in this sort of 
>>> cognitive operation (something about flipping symbolic representations like 
>>> in fractional arithmetic) and might do well wi

Re: [Interest] How to change parent of scaled QGraphicsItem while retaining scene bounding rect?

2018-08-08 Thread Patrick Stinson
Thanks for that. Though I am having some trouble. If you have PyQt, I wonder 
what problem you see with this example:

def tests_QGI_parent_transform():
app = QApplication(sys.argv)
view = QGraphicsView()

scene = QGraphicsScene()
rect = QRectF(-50.0, -50.0, 100.0, 100.0)

parentA = QGraphicsRectItem(rect) # red 

 
parentA.setPos(-100, -100)
parentA.setScale(.5)
parentA.setPen(Qt.red)
scene.addItem(parentA)

parentB = QGraphicsRectItem(rect) # blue

 
parentB.setPos(100, 100)
parentB.setScale(1.0)
parentB.setPen(Qt.blue)
scene.addItem(parentB)

child = QGraphicsRectItem(rect) # green 

 
child.setPos(-100, 100)
child.setPen(Qt.green)
scene.addItem(child)
view.setScene(scene)

buttonParent = QWidget(view)
parentAButton = QPushButton('Set Parent A', buttonParent)
parentBButton = QPushButton('Set Parent B', buttonParent)
noParentButton = QPushButton('Set No Parent', buttonParent)
ButtonLayout = QVBoxLayout(buttonParent)
ButtonLayout.addWidget(parentAButton)
ButtonLayout.addWidget(parentBButton)
ButtonLayout.addWidget(noParentButton)
buttonParent.move(10, 10)
def setParent(parent):
if parent == child.parentItem():
return
sceneTransform = child.sceneTransform() # I assume even if the child 
has a parent.   

if parent:
inverted, ok = parent.sceneTransform().inverted()
localTransform = inverted * sceneTransform
print(parent.pen().color().name())
else:
localTransform = sceneTransform
child.setTransform(localTransform)
child.setScale(1.0)
child.setRotation(0.0)
child.setParentItem(parent)
parentAButton.clicked.connect(lambda: setParent(parentA))
parentBButton.clicked.connect(lambda: setParent(parentB))
noParentButton.clicked.connect(lambda: setParent(None))

view.resize(800, 600)
r = scene.itemsBoundingRect()
sceneRect = r.marginsAdded(QMarginsF(r.x() * 2,
 r.y() * 2,
 r.width() * 2,
 r.height() * 2))
view.fitInView(sceneRect)
view.centerOn(0, 0)
view.show()
app.exec()


tests_QGI_parent_transform()




> On Aug 7, 2018, at 10:05 PM, Christian Gagneraud  wrote:
> 
> On 8 August 2018 at 15:49, Patrick Stinson  wrote:
>> Thanks for the reply. I am just particularly dense in this sort of cognitive 
>> operation (something about flipping symbolic representations like in 
>> fractional arithmetic) and might do well with just a bit of code or pseudo 
>> code. Do you think you might provide some?
> 
> I haven't done graphics stuff in a while (unfortunately), but this
> should be as simple as:
> scene_xform = item->sceneTransform();
> local_xform = next_parent->sceneTransform().inverted() * scene_xform;
> item.setTransform(local_xform);
> item.setScale(1.0);
> item.setRotation(0.0);
> item.setParentItem(next_parent);
> 
> AFAIR, QGI's rotation and scale need to be reset b/c they are combined
> with QGI's transform()
> 
> Hope this help!
> Chris
> 
>> 
>> Thanks!
>> 
>>> On Aug 7, 2018, at 6:24 PM, Christian Gagneraud  wrote:
>>> 
>>> On 8 August 2018 at 11:08, Patrick Stinson  wrote:
>>>> Hello!
>>>> 
>>>> I am trying to change the parent of a QGraphicsItem without it appearing 
>>>> to move or change size on the scene. Both the item, old parent, and new 
>>>> have arbitrary scale values set. How can this be done?
>>> 
>>> If you grab the item's sceneTransform() before re-parenting, you
>>> should be able to deduce it's new local transform from it's new parent
>>> sceneTransform().
>>> 
>>> 
>>>> 
>>>> Thanks!
>>>> ___
>>>> 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 change parent of scaled QGraphicsItem while retaining scene bounding rect?

2018-08-07 Thread Patrick Stinson
Thanks for the reply. I am just particularly dense in this sort of cognitive 
operation (something about flipping symbolic representations like in fractional 
arithmetic) and might do well with just a bit of code or pseudo code. Do you 
think you might provide some?

Thanks!

> On Aug 7, 2018, at 6:24 PM, Christian Gagneraud  wrote:
> 
> On 8 August 2018 at 11:08, Patrick Stinson  wrote:
>> Hello!
>> 
>> I am trying to change the parent of a QGraphicsItem without it appearing to 
>> move or change size on the scene. Both the item, old parent, and new have 
>> arbitrary scale values set. How can this be done?
> 
> If you grab the item's sceneTransform() before re-parenting, you
> should be able to deduce it's new local transform from it's new parent
> sceneTransform().
> 
> 
>> 
>> Thanks!
>> ___
>> 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] Setting current item text color via stylesheet in QTableView for SelectRows

2018-08-07 Thread Patrick Stinson
Hello!

I have a vanilla QTableView with SingleSelection and SelectRows and am trying 
to figure out how to set the text color of the current item for both when the 
row is selected and when it isn’t. This is important so that the user knows 
which cell will be edited when they hit the enter key and so they can navigate 
to a new cell using the arrow keys.

It seems that the following will do it, but it doesn’t apply when the row is 
selected.

QTableView::item:focus {

  
color: yellow;  

  
}

How can this be done?

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


[Interest] How to change parent of scaled QGraphicsItem while retaining scene bounding rect?

2018-08-07 Thread Patrick Stinson
Hello!

I am trying to change the parent of a QGraphicsItem without it appearing to 
move or change size on the scene. Both the item, old parent, and new have 
arbitrary scale values set. How can this be done?

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


[Interest] Clearing QMainWindow::setFilePath() on macOS

2018-07-19 Thread Patrick Stinson
Hello!

I have set a file path on my QMainWindow with QWidget::setWindowFilePath() on 
macOS. I need to clear this setting, but it doesn’t work if I pass in “”. Is 
there another way to do this?

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


[Interest] Using QItemDelegate outside item views

2018-07-13 Thread Patrick Stinson
I sometimes present collections of objects my data type in a QTableView with a 
custom model and delegate, and sometimes present a single object of this data 
type in a conventional property sheet form.

Considering I have a model and delegate already written for my table view, is 
it appropriate to re-use the delegate to create the widgets and manage the data 
editing for the property sheet as well? Something tells me that this is a 
hair-brained idea, but on the other hand it does make sense to try to 
centralize the editors for each field on the data type.

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


Re: [Interest] Complex border from QPainterPath

2018-06-29 Thread Patrick Stinson
That is a wonderfully complete and portable example. Great job!

> On Jun 29, 2018, at 1:04 PM, Christoph Feck  wrote:
> 
> On 29.06.2018 19:19, Patrick Stinson wrote:
>> I am trying to construct a text callout QGraphicsItem. It is basically a 
>> rounded
>> rect plus some triangular  protrusions from the rect center to various points
>> outside the rounded rect (see screenshot).
> 
> See attached example code.
> 
> ___
> 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] Disabling mysql support in build

2018-06-19 Thread Patrick Stinson
That seems to have worked, so far as configure is concerned. I am not sure if 
it is a bug or something with my homebrew config.

> On Jun 18, 2018, at 11:45 PM, Shawn Rutledge  wrote:
> 
> configure -no-sql-mysql I think
> 
> If you think we have a bug, you can report one, of course; but mysql doesn’t 
> ship with macOS so I guess it came from brew or some such, so maybe it’s more 
> a matter of the Qt build process not finding everything?
> 
>> On 19 Jun 2018, at 08:38, Patrick Stinson  wrote:
>> 
>> Is there any way to prevent qt from building the mysql plugin? I am getting 
>> the following compile errors in qt-5.11.0 on macOS-10.13.5.
>> 
>> Disabling would be ideal because it would solve another problem that the 
>> mysql plugin is causing as well.
>> 
>> 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


[Interest] Disabling mysql support in build

2018-06-19 Thread Patrick Stinson
Is there any way to prevent qt from building the mysql plugin? I am getting the 
following compile errors in qt-5.11.0 on macOS-10.13.5.

Disabling would be ideal because it would solve another problem that the mysql 
plugin is causing as well.

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


[Interest] Qt.PartiallyChecked broken for QListWidget in Qt 5.11?

2018-06-06 Thread Patrick Stinson
It appears as though QListWidget does not honor Qt::PartiallyChecked in 
Qt-5.11, though I could be making a mistake somewhere here. The following code 
accurately stores Qt::PartiallyChecked in the check state, and ‘1’ is printed 
by the print line. However, the painting does not reflect this (see 
screenshot). Am I making a mistake?

app = QApplication(sys.argv)
lv = QListWidget()
item = QListWidgetItem()
item.setText('here')
item.setFlags(item.flags() | Qt.ItemIsEditable | Qt.ItemIsUserCheckable | 
Qt.ItemIsAutoTristate)
item.setCheckState(Qt.PartiallyChecked)
lv.addItem(item)
print(item.checkState())
lv.show()
app.exec()


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


Re: [Interest] Persistence of editor for openPersistentEditor

2018-06-05 Thread Patrick Stinson
That is logically consistent, though it didn’t work for me. 
findChildren() still returns two objects. strange.

> On Jun 5, 2018, at 3:42 AM, william.croc...@analog.com wrote:
> 
> On 06/04/2018 05:08 PM, Patrick Stinson wrote:
>> Hello!
>> 
>> I am writing a unit test for an item view and need to get . The code in
>> *qabstractitemview_p.h* “releases” an editor created by a delegate by calling
>> *QObject::deleteLater()* on it. However, in the following code the first 
>> editor
>> is not deleted and so the second call to findChild still returns it instead 
>> of
>> the second editor:
>> 
>> view->openPersistentEditor(indexA)
>> editorA = view->findChild()
>> view->closePersistentEditor(indexA)
>> 
> 
> Here I typically  qApp->sync  and  qApp->processEvents (or so.)
> Which provide the "later" context.
> 
>> view->openPersistentEditor(indexB)
>> editorB = view->findChild()
>> view->closePersistentEditor(indexB)
>> 
>> // editorB == editorA !!
>> 
>> I am using a custom delegate which does not implement destroyEditor(), so
>> deleteLater should be called here. Am I missing something?
>> 
>> Thanks!
>> 
>> 
>> ___
>> 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] Persistence of editor for openPersistentEditor

2018-06-04 Thread Patrick Stinson
Hello!

I am writing a unit test for an item view and need to get . The code in 
qabstractitemview_p.h “releases” an editor created by a delegate by calling 
QObject::deleteLater() on it. However, in the following code the first editor 
is not deleted and so the second call to findChild still returns it instead of 
the second editor:

view->openPersistentEditor(indexA)
editorA = view->findChild()
view->closePersistentEditor(indexA)

view->openPersistentEditor(indexB)
editorB = view->findChild()
view->closePersistentEditor(indexB)

// editorB == editorA !!

I am using a custom delegate which does not implement destroyEditor(), so 
deleteLater should be called here. Am I missing something?

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


[Interest] Tap-Select QGraphicsItem on iOS

2018-05-27 Thread Patrick Stinson
Hello!

It appears that it is not possible to tap a QGraphicsItem on iOS to select it. 
Indeed, I cannot find any touch event implementation in QGraphicsView, only 
mouse events. Using the QGraphicsView's rubberband-select works fine, as it 
uses mouse events.

Has anyone found a workaround to be able to tap on a QGraphicsItem to select it 
on iOS?

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


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

2018-04-10 Thread Patrick Stinson
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

smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Determining dependencies for Qt modules

2018-03-03 Thread Patrick Stinson


> On Mar 2, 2018, at 10:28 PM, Thiago Macieira <thiago.macie...@intel.com> 
> wrote:
> 
> On Friday, 2 March 2018 17:11:55 PST Patrick Stinson wrote:
>> I am trying to create the minimum Qt build for QtWidgets, QtQuickControls,
>> QtLocation, and QtPurchasing. But when I configure with the following
>> command line:
> 
> Build everything. That’s the easiest.
> 

Definitely the easiest. Definitely time consuming. No matter how much effort I 
put into keeping my deps clean with a copy-and-paste build instructions, I 
always end up re-building enough to want it to happen quickly and in a pinch.

> Anyway, your problem was skipping qtdeclarative. You can see the dependencies 
> in the .gitmodules file.
> 

Thanks for the tip on .gitmodules. I knew it had to be somewhere. Some problems 
with it:

I had a look and qtdeclarative is only recommended for qtlocation and 
qtpurchasing. I did notice that qtandroidextras is a dependency for 
qtpurchasing, and qtpurchasing builds and installs after removing “-skip 
qtandroidextras”:

Project ERROR: Unknown module(s) in QT: location

Which is odd considering I am building on macOS. But OK, maybe the dependency 
list ignores the current platform.

But the question remains: Why doesn’t qtlocation build when it only has qtbase 
as a dependency? So I removed “-skip qtdeclarative” from the configure line, 
but still no change:

Project ERROR: Unknown module(s) in QT: location

Then I removed “-skip qtserialport” to satisfy the “recommends” entries for 
qtlocation and that did it. So in the end for qtlocation and qtpurchasing on 
macOS I had to remove qtandroidextras, qtserialport, qtdeclarative

Is the dependency list actually reliable? 

Thank you!
-Patrick

> -- 
> Thiago Macieira - thiago.macieira (AT) intel.com
>  Software Architect - Intel Open Source Technology Center
> 
> 
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest



smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Determining dependencies for Qt modules

2018-03-02 Thread Patrick Stinson
Hello!

I am trying to create the minimum Qt build for QtWidgets, QtQuickControls, 
QtLocation, and QtPurchasing. But when I configure with the following command 
line:

./configure -opensource -debug-and-release -nomake examples -nomake tests -skip 
qtactiveqt -skip qtandroidextras -skip qtcanvas3d -skip qtdeclarative -skip 
qtgamepad -skip qtremoteobjects -skip qtscript -skip qtserialbus -skip 
qtserialport -skip qtspeech -skip qtvirtualkeyboard -skip qtwayland -skip 
qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip 
qtwebview -prefix $PWD

I get the following error:

Project ERROR: Unknown module(s) in QT: location purchasing

from the following qmake file:

QT += location purchasing
SOURCES += main.cpp

Thanks!
-Patrick

smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Cross-platform alternatives to Apple App Store?

2017-12-06 Thread Patrick Stinson
Ah, Ok. I forgot that iOS doesn’t allow third party packages. I also didn’t 
connect the dots from QtPurchasing to Windows 10. I think that solves my 
problem, and I’ll just grin and bear it with the reality of the commission.

-Patrick

> On Dec 3, 2017, at 9:26 PM, Jake Petroules <jake.petrou...@qt.io> wrote:
> 
> Apple does not allow third party in-app purchase mechanisms on the macOS and 
> iOS App Stores, and the only way to distribute iOS applications is via the 
> App Store. So you're out of luck for iOS, but you can certainly do this for 
> macOS and desktop Windows. Beware that the Windows 10 app store may have 
> similar restrictions, and I have no idea about Android / Google Play.
> 
> Have you looked into QtPurchasing? It actually abstracts away the underlying 
> in-app purchase backend on macOS, iOS, Android, and the Windows 10 app store 
> as well. Not going to solve the "problem" of the stores taking their 30% cut, 
> but if technical concerns are the biggest barrier for you, then those are 
> your options.
> 
> https://doc.qt.io/qt-5/qtpurchasing-index.html
> 
>> On Dec 3, 2017, at 9:14 PM, Patrick Stinson <patrickk...@gmail.com> wrote:
>> 
>> Hi!
>> 
>> While this may or may not pertain directly to Qt, does anyone have any 
>> experience with a cross platform alternative to the Apple App Store? 
>> Hopefully something that plays well with Qt, or at least doesn’t break it?
>> 
>> I am at least looking for in-app subscription purchases for Mac, Windows, 
>> iOS, Android, Windows mobile.
>> 
>> Apple does take a large cut from Apple store purchases, but I am mostly 
>> discouraged by the idea of re-releasing an app on different bloody store 
>> workflows. I figured better to offer a free exe download and then just sell 
>> subscription tiers in the app.
>> 
>> Thanks,
>> -Patrick
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
> 
> -- 
> Jake Petroules - jake.petrou...@qt.io
> The Qt Company - Silicon Valley
> Qbs build tool evangelist - qbs.io
> 
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Cross-platform alternatives to Apple App Store?

2017-12-03 Thread Patrick Stinson
Hi!

While this may or may not pertain directly to Qt, does anyone have any 
experience with a cross platform alternative to the Apple App Store? Hopefully 
something that plays well with Qt, or at least doesn’t break it?

I am at least looking for in-app subscription purchases for Mac, Windows, iOS, 
Android, Windows mobile.

Apple does take a large cut from Apple store purchases, but I am mostly 
discouraged by the idea of re-releasing an app on different bloody store 
workflows. I figured better to offer a free exe download and then just sell 
subscription tiers in the app.

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


[Interest] Embed MyScript editor in QWidget?

2017-11-09 Thread Patrick Stinson
Hello!

Has anyone successfully embedded a MyScript UIView in a QWidget for handwriting 
recognition? I am no iOS expert, thought I would ask before I spend two weeks 
reading Apple docs to sort out the delegate/viewcontroller/etc mess.

Thanks!
-Patrick

smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] MyScript

2017-10-31 Thread Patrick Stinson
MyScript looks like an amazing handwriting-recognition toolkit. It also looks 
like the Qt Company partnered with them on an automotive project.

Has anyone had success integrating MyScript into a Qt Application on macOS/iOS? 
Are you embedding their render view into a qwidget somehow?

Thanks!
-Patrick

smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Poor retina support for QGraphicsView on macOS?

2017-10-08 Thread Patrick Stinson
Very cool. This worked well for the OpenGL viewport.

Thank you Jean-Michaël and Christian for your two solutions for this problem.

> On Oct 7, 2017, at 4:20 PM, Jean-Michaël Celerier 
> <jeanmichael.celer...@gmail.com> wrote:
> 
> > Can you suggest a sample size,
> 
> 8 or 16 maybe ? I find 4 to be a bit pixelated.
> 
> > or perhaps give a code example?
> 
> QOpenGLWidget* w = new QOpenGLWidget;;
> 
> auto fmt = QSurfaceFormat::getDefaultFormat();
> fmt.setSamples(16);
> 
> w->setFormat(fmt);
> view.setViewport(w);
> 
> 
> 
> ---
> Jean-Michaël Celerier
> http://www.jcelerier.name <http://www.jcelerier.name/>
> On Sat, Oct 7, 2017 at 7:36 PM, Patrick Stinson <patrickk...@gmail.com 
> <mailto:patrickk...@gmail.com>> wrote:
> Interesting. Can you suggest a sample size, or perhaps give a code example? 
> I’m sure how this works. Thanks!
> 
> On Oct 7, 2017, at 10:01 AM, Jean-Michaël Celerier 
> <jeanmichael.celer...@gmail.com <mailto:jeanmichael.celer...@gmail.com>> 
> wrote:
> 
>> > Don't do that and the anti-aliasing will work.
>> 
>> Or alternatively enable GL antialiasing for instance by using 
>> QSurfaceFormat::setSamples 
>> (http://doc.qt.io/qt-5/qsurfaceformat.html#setSamples 
>> <http://doc.qt.io/qt-5/qsurfaceformat.html#setSamples>) and passing the 
>> format to your GL viewport. However this ends up being quite slow on retina 
>> display in my experience.
>> 
>> 
>> 
>> ---
>> Jean-Michaël Celerier
>> http://www.jcelerier.name <http://www.jcelerier.name/>
>> On Sat, Oct 7, 2017 at 10:09 AM, Christian Gagneraud <chg...@gmail.com 
>> <mailto:chg...@gmail.com>> wrote:
>> On 7 October 2017 at 16:11, Patrick Stinson <patrickk...@gmail.com 
>> <mailto:patrickk...@gmail.com>> wrote:
>> >
>> > Hello!
>> >
>> > I am seeing the antialiasing is still quite grainy using a QGraphicsView 
>> > on mac. Is it possible to increase the device pixel ratio, or something 
>> > similar?
>> >
>> > See attached screenshots, expanding to full rez before viewing. Note 
>> > smoothness of retina button pixmaps at left VS jagged lines in middle.
>> >
>> > I am using a QOpenGLWidget for the viewport (though this doesn’t seem to 
>> > matter):
>> 
>> I vaguely remember that anti-aliasing doesn't work with an OpenGL view
>> (that was on a Linux machine).
>> 
>> > view.setViewport(QOpenGLWidget())
>> 
>> Don't do that and the anti-aliasing will work.
>> 
>> Chris
>> 
>> 
>> 
>> >
>> > I am painting QPainterPaths like this:
>> >
>> > def paint(self, painter, option, widget):
>> > painter.save()
>> > painter.setPen(self.pen)
>> > painter.setBrush(self.brush)
>> > painter.drawPath(self.path)
>> > painter.restore()
>> >
>> > with the following render hints:
>> >
>> > view.setRenderHints(QPainter.Antialiasing|QPainter.HighQualityAntialiasing|QPainter.SmoothPixmapTransform|QPainter.TextAntialiasing)
>> >
>> > and the following attribute set on the QApplication:
>> >
>> > app.setAttribute(Qt.AA_UseHighDpiPixmaps, True)
>> >
>> > Thanks!
>> > -P
>> >
>> >
>> >
>> >
>> >
>> > ___
>> > 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>
>> 
> 



smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Synchronous painting on QGraphicsScene

2017-10-07 Thread Patrick Stinson


> On Oct 7, 2017, at 8:00 PM, Christian Gagneraud <chg...@gmail.com> wrote:
> 
> On 8 October 2017 at 06:27, Patrick Stinson <patrickk...@gmail.com> wrote:
>> Hmm. Actually, I think that the elastic node example is implemented in the
>> same way as my app. Because of the delayed response of the “elasticity” in
>> the algorithm it is not possible to demonstrate a solution to my problem
>> even if it solved it.
>> 
>> Like the elastic node example, I am implementing QGraphicsItem::itemChange
>> for the node listening for QGraphicsItem::ItemPositionHasChanged, and then
>> updating the edges’s geometry just after calling ::prepareGeometryChange.
>> This queues an update for the next paint buffer, which is what causes my
>> problem.
> 
> If you can notice the time lag b/w the 2 paint events, it means that
> something is slow. Slow enough to cause a 20+ ms delay.
> So maybe your problem is elsewhere. Do you have this problem even
> without the opengl view?

What I mean is that this is visible if I move the mouse one pixel, or event 
more visible (and quite annoying) if I nudge the node (say, 10 pixels at a 
time) with the arrow keys.

> 
> If i'm not wrong, although the paint() on the edge item is not called
> within your mouse event of the node. the edge should be repainted
> right after the mouse event has finished, which should be a very short
> time period.
> 
> But maybe you’re talking about "paint buffer" in the OpenGL pipeline?

I think you had me right. I (sadly) don’t know anything about OpenGL!

> 
>> What I am wondering is if it is possible to implement painting in a
>> synchronous way, where all paint events which result from a single mouse
>> event are done in the same buffer frame.
> 
> Or maybe your python code is too slow to make the 2 paint event fits
> in a single buffer frame timeline.
> 
> Chris
> 
>> 
>> Make sense?
>> 
>> 
>> On Oct 7, 2017, at 1:01 AM, Christian Gagneraud <chg...@gmail.com> wrote:
>> 
>> On 7 October 2017 at 16:08, Patrick Stinson <patrickk...@gmail.com> wrote:
>> 
>> Hi there!
>> 
>> I have a graph-ish diagram app where dragging some objects (like nodes)
>> necessitates dragging other objects (like connecting edges). However, if I
>> update an edge from the mouse event or ItemChanged(position) event then the
>> edge isn’t painted until the next paint event. At times, this is quite
>> obvious for example when nudging a node with an arrow key and the node is
>> going in one direction and edge goes in the other direction for one frame
>> because it is one buffer behind.
>> 
>> Any thoughts on synchronous painting?
>> 
>> 
>> Have you check the "Elastic node"  example? It does exactly what
>> you're describing. And last time i tried it, it worked very well, no
>> painting artifact.
>> How is your "update"  done exactly?
>> 
>> Chris
>> 
>> 
>> Thank you
>> -Patrick
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>> 
>> 



smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Synchronous painting on QGraphicsScene

2017-10-07 Thread Patrick Stinson
Hmm. Actually, I think that the elastic node example is implemented in the same 
way as my app. Because of the delayed response of the “elasticity” in the 
algorithm it is not possible to demonstrate a solution to my problem even if it 
solved it.

Like the elastic node example, I am implementing QGraphicsItem::itemChange for 
the node listening for QGraphicsItem::ItemPositionHasChanged, and then updating 
the edges’s geometry just after calling ::prepareGeometryChange. This queues an 
update for the next paint buffer, which is what causes my problem.

What I am wondering is if it is possible to implement painting in a synchronous 
way, where all paint events which result from a single mouse event are done in 
the same buffer frame.

Make sense?

> On Oct 7, 2017, at 1:01 AM, Christian Gagneraud <chg...@gmail.com> wrote:
> 
> On 7 October 2017 at 16:08, Patrick Stinson <patrickk...@gmail.com> wrote:
>> Hi there!
>> 
>> I have a graph-ish diagram app where dragging some objects (like nodes) 
>> necessitates dragging other objects (like connecting edges). However, if I 
>> update an edge from the mouse event or ItemChanged(position) event then the 
>> edge isn’t painted until the next paint event. At times, this is quite 
>> obvious for example when nudging a node with an arrow key and the node is 
>> going in one direction and edge goes in the other direction for one frame 
>> because it is one buffer behind.
>> 
>> Any thoughts on synchronous painting?
> 
> Have you check the "Elastic node"  example? It does exactly what
> you're describing. And last time i tried it, it worked very well, no
> painting artifact.
> How is your "update"  done exactly?
> 
> Chris
> 
>> 
>> Thank you
>> -Patrick
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>> 



smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Poor retina support for QGraphicsView on macOS?

2017-10-07 Thread Patrick Stinson
Interesting. Can you suggest a sample size, or perhaps give a code example? I’m 
sure how this works. Thanks!

> On Oct 7, 2017, at 10:01 AM, Jean-Michaël Celerier 
> <jeanmichael.celer...@gmail.com> wrote:
> 
> > Don't do that and the anti-aliasing will work.
> 
> Or alternatively enable GL antialiasing for instance by using 
> QSurfaceFormat::setSamples 
> (http://doc.qt.io/qt-5/qsurfaceformat.html#setSamples) and passing the format 
> to your GL viewport. However this ends up being quite slow on retina display 
> in my experience.
> 
> 
> 
> ---
> Jean-Michaël Celerier
> http://www.jcelerier.name
> 
>> On Sat, Oct 7, 2017 at 10:09 AM, Christian Gagneraud <chg...@gmail.com> 
>> wrote:
>> On 7 October 2017 at 16:11, Patrick Stinson <patrickk...@gmail.com> wrote:
>> >
>> > Hello!
>> >
>> > I am seeing the antialiasing is still quite grainy using a QGraphicsView 
>> > on mac. Is it possible to increase the device pixel ratio, or something 
>> > similar?
>> >
>> > See attached screenshots, expanding to full rez before viewing. Note 
>> > smoothness of retina button pixmaps at left VS jagged lines in middle.
>> >
>> > I am using a QOpenGLWidget for the viewport (though this doesn’t seem to 
>> > matter):
>> 
>> I vaguely remember that anti-aliasing doesn't work with an OpenGL view
>> (that was on a Linux machine).
>> 
>> > view.setViewport(QOpenGLWidget())
>> 
>> Don't do that and the anti-aliasing will work.
>> 
>> Chris
>> 
>> 
>> 
>> >
>> > I am painting QPainterPaths like this:
>> >
>> > def paint(self, painter, option, widget):
>> > painter.save()
>> > painter.setPen(self.pen)
>> > painter.setBrush(self.brush)
>> > painter.drawPath(self.path)
>> > painter.restore()
>> >
>> > with the following render hints:
>> >
>> > view.setRenderHints(QPainter.Antialiasing|QPainter.HighQualityAntialiasing|QPainter.SmoothPixmapTransform|QPainter.TextAntialiasing)
>> >
>> > and the following attribute set on the QApplication:
>> >
>> > app.setAttribute(Qt.AA_UseHighDpiPixmaps, True)
>> >
>> > Thanks!
>> > -P
>> >
>> >
>> >
>> >
>> >
>> > ___
>> > 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] Poor retina support for QGraphicsView on macOS?

2017-10-07 Thread Patrick Stinson
That is correct, this did fix the antialiasing issue at the expense of 
performance. I suppose it is a trade off.

> On Oct 7, 2017, at 1:09 AM, Christian Gagneraud <chg...@gmail.com> wrote:
> 
>> On 7 October 2017 at 16:11, Patrick Stinson <patrickk...@gmail.com> wrote:
>> 
>> Hello!
>> 
>> I am seeing the antialiasing is still quite grainy using a QGraphicsView on 
>> mac. Is it possible to increase the device pixel ratio, or something similar?
>> 
>> See attached screenshots, expanding to full rez before viewing. Note 
>> smoothness of retina button pixmaps at left VS jagged lines in middle.
>> 
>> I am using a QOpenGLWidget for the viewport (though this doesn’t seem to 
>> matter):
> 
> I vaguely remember that anti-aliasing doesn't work with an OpenGL view
> (that was on a Linux machine).
> 
>> view.setViewport(QOpenGLWidget())
> 
> Don't do that and the anti-aliasing will work.
> 
> Chris
> 
> 
> 
>> 
>> I am painting QPainterPaths like this:
>> 
>> def paint(self, painter, option, widget):
>>painter.save()
>>painter.setPen(self.pen)
>>painter.setBrush(self.brush)
>>painter.drawPath(self.path)
>>painter.restore()
>> 
>> with the following render hints:
>> 
>> view.setRenderHints(QPainter.Antialiasing|QPainter.HighQualityAntialiasing|QPainter.SmoothPixmapTransform|QPainter.TextAntialiasing)
>> 
>> and the following attribute set on the QApplication:
>> 
>> app.setAttribute(Qt.AA_UseHighDpiPixmaps, True)
>> 
>> Thanks!
>> -P
>> 
>> 
>> 
>> 
>> 
>> ___
>> 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] Synchronous painting on QGraphicsScene

2017-10-06 Thread Patrick Stinson
Hi there!

I have a graph-ish diagram app where dragging some objects (like nodes) 
necessitates dragging other objects (like connecting edges). However, if I 
update an edge from the mouse event or ItemChanged(position) event then the 
edge isn’t painted until the next paint event. At times, this is quite obvious 
for example when nudging a node with an arrow key and the node is going in one 
direction and edge goes in the other direction for one frame because it is one 
buffer behind.

Any thoughts on synchronous painting?

Thank you
-Patrick

smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Project ERROR: Could not find feature static

2017-09-21 Thread Patrick Stinson
I pulled the 5.10 (also tried with ) branch from git into folder A, then 
configured and built qt from folder B like so:

../../../pyqt-sysroot-base/src/qt5-src/configure -opensource -confirm-license 
-nomake examples -nomake tests -prefix $PWD

But when I try to run qmake on any project file I get the following:

Project ERROR: Could not find feature static

I imagine this has something to do with a path setting not being set somewhere?

Thanks!
-Patrick

smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Building & Running on High Sierra

2017-09-20 Thread Patrick Stinson
that looks like it. I guess i should have searched for 10.13 instead of high 
sierra

> On Sep 20, 2017, at 11:28 AM, Jake Petroules <jake.petrou...@gmail.com> wrote:
> 
> Likely https://codereview.qt-project.org/#/c/205954/
> 
>> On Sep 20, 2017, at 11:19 AM, Patrick Stinson <patrickk...@gmail.com> wrote:
>> 
>> Thank you. Any thoughts about the  branch problem?
>> 
>>> On Sep 20, 2017, at 10:45 AM, Jake Petroules <jake.petrou...@gmail.com> 
>>> wrote:
>>> 
>>> This is QTBUG-62266, which has been fixed by 
>>> https://codereview.qt-project.org/#/c/201546/ for Qt 5.9.2.
>>> 
>>>> On Sep 20, 2017, at 8:00 AM, Patrick Stinson <patrickk...@gmail.com> wrote:
>>>> 
>>>> Actually yes, I did. Xcode 9 is required for iOS 11.
>>>> 
>>>> 
>>>> 
>>>>> On Sep 20, 2017, at 7:59 AM, Mitch Curtis <mitch.cur...@qt.io> wrote:
>>>>> 
>>>>> Did you recently update Xcode? I just ran into a failure on the 5.10 
>>>>> branch after installing updates:
>>>>> 
>>>>> https://bugreports.qt.io/browse/QTBUG-63323
>>>>> 
>>>>> From: Interest 
>>>>> [mailto:interest-bounces+mitch.curtis=qt...@qt-project.org] On Behalf Of 
>>>>> Patrick Stinson
>>>>> Sent: Wednesday, 20 September 2017 4:56 PM
>>>>> To: Qt Interest <interest@qt-project.org>
>>>>> Subject: [Interest] Building & Running on High Sierra
>>>>> 
>>>>> Is there a version or commit that runs on high sierra? I am getting 
>>>>> segfaults in a 300-or-so deep stack of calls in libqcocoa.dylib using the 
>>>>>  branch on git (need to try again to get a useful stack trace).
>>>>> 
>>>>> Qt-5.9.1 fails to build in qcoregraphics.mm like so:
>>>>> 
>>>>> dor/pyqt-sysroot-base/src/qt-everywhere-opensource-src-5.9.1/qtbase/src/gui/painting/qcoregraphics.mm
>>>>> /Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt-everywhere-opensource-src-5.9.1/qtbase/src/gui/painting/qcoregraphics.mm:81:39:
>>>>>  error: use of undeclared identifier
>>>>>'InvalidContext'
>>>>>  require_action(inContext != NULL, InvalidContext, err = paramErr);
>>>>>^
>>>>> /Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt-everywhere-opensource-src-5.9.1/qtbase/src/gui/painting/qcoregraphics.mm:82:38:
>>>>>  error: use of undeclared identifier
>>>>>'InvalidBounds'
>>>>>  require_action(inBounds != NULL, InvalidBounds, err = paramErr);
>>>>>   ^
>>>>> /Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt-everywhere-opensource-src-5.9.1/qtbase/src/gui/painting/qcoregraphics.mm:83:37:
>>>>>  error: use of undeclared identifier
>>>>>'InvalidImage'
>>>>>  require_action(inImage != NULL, InvalidImage, err = paramErr);
>>>>>  ^
>>>>> 3 errors generated.
>>>>> 
>>>>> Thoughts?
>>>> 
>>>> ___
>>>> Interest mailing list
>>>> Interest@qt-project.org
>>>> http://lists.qt-project.org/mailman/listinfo/interest
>>> 
>>> -- 
>>> Jake Petroules - jake.petrou...@qt.io
>>> The Qt Company - Silicon Valley
>>> Qbs build tool evangelist - qbs.io
>>> 
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
> 



smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Building & Running on High Sierra

2017-09-20 Thread Patrick Stinson
Thank you. Any thoughts about the  branch problem?

> On Sep 20, 2017, at 10:45 AM, Jake Petroules <jake.petrou...@gmail.com> wrote:
> 
> This is QTBUG-62266, which has been fixed by 
> https://codereview.qt-project.org/#/c/201546/ for Qt 5.9.2.
> 
>> On Sep 20, 2017, at 8:00 AM, Patrick Stinson <patrickk...@gmail.com> wrote:
>> 
>> Actually yes, I did. Xcode 9 is required for iOS 11.
>> 
>> 
>> 
>>> On Sep 20, 2017, at 7:59 AM, Mitch Curtis <mitch.cur...@qt.io> wrote:
>>> 
>>> Did you recently update Xcode? I just ran into a failure on the 5.10 branch 
>>> after installing updates:
>>> 
>>> https://bugreports.qt.io/browse/QTBUG-63323
>>> 
>>> From: Interest [mailto:interest-bounces+mitch.curtis=qt...@qt-project.org] 
>>> On Behalf Of Patrick Stinson
>>> Sent: Wednesday, 20 September 2017 4:56 PM
>>> To: Qt Interest <interest@qt-project.org>
>>> Subject: [Interest] Building & Running on High Sierra
>>> 
>>> Is there a version or commit that runs on high sierra? I am getting 
>>> segfaults in a 300-or-so deep stack of calls in libqcocoa.dylib using the 
>>>  branch on git (need to try again to get a useful stack trace).
>>> 
>>> Qt-5.9.1 fails to build in qcoregraphics.mm like so:
>>> 
>>> dor/pyqt-sysroot-base/src/qt-everywhere-opensource-src-5.9.1/qtbase/src/gui/painting/qcoregraphics.mm
>>> /Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt-everywhere-opensource-src-5.9.1/qtbase/src/gui/painting/qcoregraphics.mm:81:39:
>>>  error: use of undeclared identifier
>>>  'InvalidContext'
>>>require_action(inContext != NULL, InvalidContext, err = paramErr);
>>>  ^
>>> /Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt-everywhere-opensource-src-5.9.1/qtbase/src/gui/painting/qcoregraphics.mm:82:38:
>>>  error: use of undeclared identifier
>>>  'InvalidBounds'
>>>require_action(inBounds != NULL, InvalidBounds, err = paramErr);
>>> ^
>>> /Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt-everywhere-opensource-src-5.9.1/qtbase/src/gui/painting/qcoregraphics.mm:83:37:
>>>  error: use of undeclared identifier
>>>  'InvalidImage'
>>>require_action(inImage != NULL, InvalidImage, err = paramErr);
>>>^
>>> 3 errors generated.
>>> 
>>> Thoughts?
>> 
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
> 
> -- 
> Jake Petroules - jake.petrou...@qt.io
> The Qt Company - Silicon Valley
> Qbs build tool evangelist - qbs.io
> 
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Building & Running on High Sierra

2017-09-20 Thread Patrick Stinson
Actually yes, I did. Xcode 9 is required for iOS 11.



> On Sep 20, 2017, at 7:59 AM, Mitch Curtis <mitch.cur...@qt.io> wrote:
> 
> Did you recently update Xcode? I just ran into a failure on the 5.10 branch 
> after installing updates:
>  
> https://bugreports.qt.io/browse/QTBUG-63323 
> <https://bugreports.qt.io/browse/QTBUG-63323>
>  
> From: Interest [mailto:interest-bounces+mitch.curtis=qt...@qt-project.org 
> <mailto:interest-bounces+mitch.curtis=qt...@qt-project.org>] On Behalf Of 
> Patrick Stinson
> Sent: Wednesday, 20 September 2017 4:56 PM
> To: Qt Interest <interest@qt-project.org <mailto:interest@qt-project.org>>
> Subject: [Interest] Building & Running on High Sierra
>  
> Is there a version or commit that runs on high sierra? I am getting segfaults 
> in a 300-or-so deep stack of calls in libqcocoa.dylib using the  branch 
> on git (need to try again to get a useful stack trace).
>  
> Qt-5.9.1 fails to build in qcoregraphics.mm like so:
>  
> dor/pyqt-sysroot-base/src/qt-everywhere-opensource-src-5.9.1/qtbase/src/gui/painting/qcoregraphics.mm
> /Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt-everywhere-opensource-src-5.9.1/qtbase/src/gui/painting/qcoregraphics.mm:81:39:
>  error: use of undeclared identifier
>   'InvalidContext'
> require_action(inContext != NULL, InvalidContext, err = paramErr);
>   ^
> /Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt-everywhere-opensource-src-5.9.1/qtbase/src/gui/painting/qcoregraphics.mm:82:38:
>  error: use of undeclared identifier
>   'InvalidBounds'
> require_action(inBounds != NULL, InvalidBounds, err = paramErr);
>  ^
> /Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt-everywhere-opensource-src-5.9.1/qtbase/src/gui/painting/qcoregraphics.mm:83:37:
>  error: use of undeclared identifier
>   'InvalidImage'
> require_action(inImage != NULL, InvalidImage, err = paramErr);
> ^
> 3 errors generated.
>  
> Thoughts?



smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Building & Running on High Sierra

2017-09-20 Thread Patrick Stinson
Is there a version or commit that runs on high sierra? I am getting segfaults 
in a 300-or-so deep stack of calls in libqcocoa.dylib using the  branch on 
git (need to try again to get a useful stack trace).

Qt-5.9.1 fails to build in qcoregraphics.mm like so:

dor/pyqt-sysroot-base/src/qt-everywhere-opensource-src-5.9.1/qtbase/src/gui/painting/qcoregraphics.mm
/Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt-everywhere-opensource-src-5.9.1/qtbase/src/gui/painting/qcoregraphics.mm:81:39:
 error: use of undeclared identifier
  'InvalidContext'
require_action(inContext != NULL, InvalidContext, err = paramErr);
  ^
/Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt-everywhere-opensource-src-5.9.1/qtbase/src/gui/painting/qcoregraphics.mm:82:38:
 error: use of undeclared identifier
  'InvalidBounds'
require_action(inBounds != NULL, InvalidBounds, err = paramErr);
 ^
/Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt-everywhere-opensource-src-5.9.1/qtbase/src/gui/painting/qcoregraphics.mm:83:37:
 error: use of undeclared identifier
  'InvalidImage'
require_action(inImage != NULL, InvalidImage, err = paramErr);
^
3 errors generated.

Thoughts?

smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Pan-scroll gesture for QGraphicsView on iOS?

2017-09-19 Thread Patrick Stinson
The pan gesture scrolls qgraphicsview just fine on macOS, but the same code 
doesn't work on iOS. Is there something special I need to do there?

Thank you!

smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QMake: How to add xcconfig file and set for target config

2017-08-30 Thread Patrick Stinson

I am generating an Xcode project from a .pro file and want to set an xcconfig 
file as the build configuration for a particular target in the project. This 
means that I need to edit the .pro file to:

1) add the xcconfig file to the project
2) set the xcconfig in the build settings for the target.

How can I do this with qmake?

Thanks!
-Patrick

smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QMake: Way to set capabilities for Xcode project?

2017-08-30 Thread Patrick Stinson
I am dependent on a tool that uses qmake to regenerate an xcodeproject whenever 
I add a source file, and so I always have to find the way to make any changes 
to the Xcode project within the .pro file. I have done well until this point 
with the Info.plist file.

But now I need to be able to enable the iCloud Drive and Push Notifications 
capabilities, which can not be done from the Info.plist. This setting has to 
happen in the Xcode project file itself. How can I set this from the .pro file?

Thanks!

smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Slow refresh rate on QPropertyAnimation => pos for child widget?

2017-08-02 Thread Patrick Stinson
Hello! I am getting pretty good refresh rates on QPropertyAnimation for 
QGraphicsScene, as the interval set in the qt source is for 60fps. But 
animating a child widget’s position looks more like 20fps. The widget in 
question is a child of the QGraphicsView.

See the following screencast, which itself uses a high enough fps to accurately 
capture the refresh rate of the widget animation.

https://www.screencast.com/t/U8tDdZqWzkcH 


Thoughts? Thanks!
-Patrick



smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Child QWidget fade-in with QGraphicsOpacityEffect

2017-08-01 Thread Patrick Stinson
I have a QGraphicsView (under QMainWindow) with a pop-up QWidget for item 
properties which fades in with QGraphicsOpacity effect. The problem is that 
when I start the animation the outer frame border of the widget fades in as 
expected, but the contents of the widget remains transparent until I click 
somewhere on the window. Seem like a Qt bug.

Thoughts?
self.effect = QGraphicsOpacityEffect(self)
self.setGraphicsEffect(self.effect)
self.opacityAnimation = QPropertyAnimation(self.effect, b'opacity')
self.opacityAnimation.setDuration(300)
self.opacityAnimation.finished.connect(self.onOpacityDone)

def show(self):
super().show()
self.opacityAnimation.setStartValue(0)
self.opacityAnimation.setEndValue(1)
self.opacityAnimation.start()

def hide(self):
self.person = None
if self.opacityAnimation.finished():
self.opacityAnimation.setStartValue(0)
self.opacityAnimation.setEndValue(1)
self.opacityAnimation.start()
else:
super().hide()

def onOpacityDone(self):
if self.opacityAnimation.currentValue() == 0:
super().hide()



smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] simple crash with QGraphicsScene

2017-07-29 Thread Patrick Stinson
Hello! I have reproduced a crash with QGraphicsView where you:

- add a single item in the middle of the scene,
- resize (shrink) the window with the mouse so the item is not fully visible
- resize (grow) the window again
- ***the issue happens right when item is fully visible again.***

Any idea how to work around this? I don’t know enough about QWidgetBackingStore 
and the gui kernel to debug this and my diagramming app is crashing randomly 
when the scene is not in view.

Thanks!

CONSOLE OUTPUT
==

QPainter::begin: A paint device can only be painted by one painter at a time.
QPainter::setCompositionMode: Painter not active
QPaintDevice: Cannot destroy paint device that is being painted

STACK TRACE
==

#0  0x00010a2f09fe in QPainter::begin(QPaintDevice*) at 
/Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt5-src/qtbase/src/gui/painting/qpainter.cpp:1707
#1  0x00010a2f094a in QPainter::QPainter(QPaintDevice*) at 
/Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt5-src/qtbase/src/gui/painting/qpainter.cpp:1476
#2  0x00010a2ed5bd in QPainter::QPainter(QPaintDevice*) at 
/Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt5-src/qtbase/src/gui/painting/qpainter.cpp:1472
#3  0x00010de4d4f5 in QRasterBackingStore::beginPaint(QRegion const&) 
at 
/Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt5-src/qtbase/src/platformsupport/graphics/qrasterbackingstore.cpp:124
#4  0x00010a236f8b in QBackingStore::beginPaint(QRegion const&) at 
/Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt5-src/qtbase/src/gui/painting/qbackingstore.cpp:176
#5  0x00010937a152 in QWidgetBackingStore::beginPaint(QRegion&, 
QWidget*, QBackingStore*, BeginPaintInfo*, bool) at 
/Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt5-src/qtbase/src/widgets/kernel/qwidgetbackingstore.cpp:335
#6  0x00010938088e in QWidgetBackingStore::doSync() at 
/Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt5-src/qtbase/src/widgets/kernel/qwidgetbackingstore.cpp:1335
#7  0x00010937effc in QWidgetBackingStore::sync() at 
/Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt5-src/qtbase/src/widgets/kernel/qwidgetbackingstore.cpp:1156
#8  0x0001093ad4b3 in QWidgetPrivate::syncBackingStore() at 
/Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt5-src/qtbase/src/widgets/kernel/qwidget.cpp:1970
#9  0x0001093c1fd7 in QWidget::event(QEvent*) at 
/Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt5-src/qtbase/src/widgets/kernel/qwidget.cpp:9107
#10 0x00010952141b in QFrame::event(QEvent*) at 
/Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt5-src/qtbase/src/widgets/widgets/qframe.cpp:550
#11 0x0001095dbb0e in QAbstractScrollArea::event(QEvent*) at 
/Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt5-src/qtbase/src/widgets/widgets/qabstractscrollarea.cpp:1153
#12 0x0001098357cf in QGraphicsView::event(QEvent*) at 
/Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt5-src/qtbase/src/widgets/graphicsview/qgraphicsview.cpp:2849
#13 0x000108ba9cd3 in sipQGraphicsView::event(QEvent*) at 
/Users/patrick/dev/vendor/pyqt-sysroot-dev/build/PyQt5_gpl-5.8/QtWidgets/sipQtWidgetspart0.cpp:184236
#14 0x00010936831f in QApplicationPrivate::notify_helper(QObject*, 
QEvent*) at 
/Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt5-src/qtbase/src/widgets/kernel/qapplication.cpp:3722
#15 0x00010936d549 in QApplication::notify(QObject*, QEvent*) at 
/Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt5-src/qtbase/src/widgets/kernel/qapplication.cpp:3685
#16 0x000108c2d278 in sipQApplication::notify(QObject*, QEvent*) at 
/Users/patrick/dev/vendor/pyqt-sysroot-dev/build/PyQt5_gpl-5.8/QtWidgets/sipQtWidgetspart0.cpp:308213
#17 0x00010811f575 in QCoreApplication::notifyInternal2(QObject*, 
QEvent*) at 
/Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt5-src/qtbase/src/corelib/kernel/qcoreapplication.cpp:1018
#18 0x000108120f28 in QCoreApplication::sendEvent(QObject*, QEvent*) at 
/Users/patrick/dev/vendor/pyqt-sysroot-dev/build/qt5/qtbase/src/corelib/.moc/../../../../../../../pyqt-sysroot-base/src/qt5-src/qtbase/src/corelib/kernel/qcoreapplication.h:234
#19 0x000108120dae in 
QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) at 
/Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt5-src/qtbase/src/corelib/kernel/qcoreapplication.cpp:1693
#20 0x00010812000f in QCoreApplication::sendPostedEvents(QObject*, int) 
at 
/Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt5-src/qtbase/src/corelib/kernel/qcoreapplication.cpp:1547
#21 0x00010dd029ae in 
QCocoaEventDispatcherPrivate::processPostedEvents() at 
/Users/patrick/dev/vendor/pyqt-sysroot-base/src/qt5-src/qtbase/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm:887
#22 0x00010dd0385f in 
QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) at 

Re: [Interest] Any way to achieve retina resolution on QGraphicsView?

2017-07-25 Thread Patrick Stinson
Another screenshot. Note smoothness of retina button pixmaps at left VS jagged 
lines in middle.





> On Jul 25, 2017, at 6:27 PM, Patrick Stinson <patrickk...@gmail.com> wrote:
> 
> Hello!
> 
> I am seeing the antialiasing is still quite grainy using a QGraphicsView on 
> mac. Is it possible to increase the device pixel ratio, or something similar?
> 
> Thanks!
> -P
> 
> <2017-07-25_18-25-52.jpg>



smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Any way to achieve retina resolution on QGraphicsView?

2017-07-25 Thread Patrick Stinson
Hello!

I am seeing the antialiasing is still quite grainy using a QGraphicsView on 
mac. Is it possible to increase the device pixel ratio, or something similar?

Thanks!
-P



smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QMacCGContext:: Unsupported painter devtype type 1

2017-07-25 Thread Patrick Stinson
Does anyone get this warning output to console for every mouse event when using 
rubber band selection on QGraphicsView?

QMacCGContext:: Unsupported painter devtype type 1

Thanks!
-Patrick

smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan nan]'

2017-07-25 Thread Patrick Stinson
Anyone seen this error? It looks like an automated QtWidgets test caught it 
back in 2015, but I can’t seem to nail it down to any particular cause in my 
own app.

Thanks!

turin:pkdiagram patrick$ make run
2017-07-25 13:16:36.669 python[1892:844774] *** Terminating app due to uncaught 
exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: 
[nan nan]'
*** First throw call stack:
(
0   CoreFoundation  0x7fffaeac02cb 
__exceptionPreprocess + 171
1   libobjc.A.dylib 0x7fffc38cb48d 
objc_exception_throw + 48
2   CoreFoundation  0x7fffaeb3ec3d 
+[NSException raise:format:] + 205
3   QuartzCore  0x7fffb467a066 
_ZN2CA5Layer12set_positionERKNS_4Vec2IdEEb + 152
4   QuartzCore  0x7fffb467a1db -[CALayer 
setPosition:] + 44
5   QuartzCore  0x7fffb467a831 -[CALayer 
setFrame:] + 644
6   AppKit  0x7fffac57ee98 
-[NSScrollerImp _updateLayerGeometry] + 319
7   AppKit  0x7fffacc470da -[NSScroller 
setFloatValue:knobProportion:] + 371
8   libqmacstyle_debug.dylib0x0001147dc8fb 
_ZL13setupScrollerP10NSScrollerPK18QStyleOptionSlider + 379
9   libqmacstyle_debug.dylib0x0001147d7c00 
_ZNK9QMacStyle18drawComplexControlEN6QStyle14ComplexControlEPK19QStyleOptionComplexP8QPainterPK7QWidget
 + 4608
10  libQt5Widgets_debug.5.dylib 0x00010b666a19 
_ZNK16QStyleSheetStyle18drawComplexControlEN6QStyle14ComplexControlEPK19QStyleOptionComplexP8QPainterPK7QWidget
 + 9177
11  libQt5Widgets_debug.5.dylib 0x00010b799373 
_ZN10QScrollBar10paintEventEP11QPaintEvent + 339
12  libQt5Widgets_debug.5.dylib 0x00010b5c68e4 
_ZN7QWidget5eventEP6QEvent + 2404
13  libQt5Widgets_debug.5.dylib 0x00010b812bd8 
_ZN15QAbstractSlider5eventEP6QEvent + 40
14  libQt5Widgets_debug.5.dylib 0x00010b799119 
_ZN10QScrollBar5eventEP6QEvent + 489
15  libQt5Widgets_debug.5.dylib 0x00010b56d31f 
_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 431
16  libQt5Widgets_debug.5.dylib 0x00010b572549 
_ZN12QApplication6notifyEP7QObjectP6QEvent + 14121
17  QtWidgets.so0x00010ae32278 
_ZN15sipQApplication6notifyEP7QObjectP6QEvent + 136
18  libQt5Core_debug.5.dylib0x00010913d575 
_ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 277
19  libQt5Widgets_debug.5.dylib 0x00010b56be9c 
_ZN16QCoreApplication20sendSpontaneousEventEP7QObjectP6QEvent + 60
20  libQt5Widgets_debug.5.dylib 0x00010b5be194 
_ZN14QWidgetPrivate14sendPaintEventERK7QRegion + 68
21  libQt5Widgets_debug.5.dylib 0x00010b5bda00 
_ZN14QWidgetPrivate10drawWidgetEP12QPaintDeviceRK7QRegionRK6QPointiP8QPainterP19QWidgetBackingStore
 + 3088
22  libQt5Widgets_debug.5.dylib 0x00010b5be760 
_ZN14QWidgetPrivate22paintSiblingsRecursiveEP12QPaintDeviceRK5QListIP7QObjectEiRK7QRegionRK6QPointiP8QPainterP19QWidgetBackingStore
 + 1248
23  libQt5Widgets_debug.5.dylib 0x00010b5bde84 
_ZN14QWidgetPrivate10drawWidgetEP12QPaintDeviceRK7QRegionRK6QPointiP8QPainterP19QWidgetBackingStore
 + 4244
24  libQt5Widgets_debug.5.dylib 0x00010b5be760 
_ZN14QWidgetPrivate22paintSiblingsRecursiveEP12QPaintDeviceRK5QListIP7QObjectEiRK7QRegionRK6QPointiP8QPainterP19QWidgetBackingStore
 + 1248
25  libQt5Widgets_debug.5.dylib 0x00010b5be606 
_ZN14QWidgetPrivate22paintSiblingsRecursiveEP12QPaintDeviceRK5QListIP7QObjectEiRK7QRegionRK6QPointiP8QPainterP19QWidgetBackingStore
 + 902
26  libQt5Widgets_debug.5.dylib 0x00010b5bde84 
_ZN14QWidgetPrivate10drawWidgetEP12QPaintDeviceRK7QRegionRK6QPointiP8QPainterP19QWidgetBackingStore
 + 4244
27  libQt5Widgets_debug.5.dylib 0x00010b5be760 
_ZN14QWidgetPrivate22paintSiblingsRecursiveEP12QPaintDeviceRK5QListIP7QObjectEiRK7QRegionRK6QPointiP8QPainterP19QWidgetBackingStore
 + 1248
28  libQt5Widgets_debug.5.dylib 0x00010b5bde84 
_ZN14QWidgetPrivate10drawWidgetEP12QPaintDeviceRK7QRegionRK6QPointiP8QPainterP19QWidgetBackingStore
 + 4244
29  libQt5Widgets_debug.5.dylib 0x00010b585c84 
_ZN19QWidgetBackingStore6doSyncEv + 5268
30  libQt5Widgets_debug.5.dylib 0x00010b5844c3 
_ZN19QWidgetBackingStore4syncEP7QWidgetRK7QRegion + 627
31  libQt5Widgets_debug.5.dylib 0x00010b5b25cb 
_ZN14QWidgetPrivate16syncBackingStoreERK7QRegion + 123
32  libQt5Widgets_debug.5.dylib 0x00010b5f66fc 
_ZN13QWidgetWindow17handleExposeEventEP12QExposeEvent + 476
33  libQt5Widgets_debug.5.dylib 

Re: [Interest] How to update QGraphicsView transform when scrolling view with wheel?

2017-07-25 Thread Patrick Stinson
def viewportEvent(self, e):
if e.type() == QEvent.TouchBegin or e.type() == QEvent.TouchUpdate or 
e.type() == QEvent.TouchEnd:
points = e.touchPoints()
if e.type() == QEvent.TouchBegin and not self.scene().dragItem:
e.accept()
if len(points) == 2 and e.type() == QEvent.TouchUpdate:
e.accept()
THRESHOLD = 10.0
COEFF = 1.0
orig = QLineF(points[0].startPos(), points[1].startPos())
now = QLineF(points[0].pos(), points[1].pos())
delta = abs(now.length() - orig.length())
if self.zoomScaleStart is None and delta > THRESHOLD:
self.zoomScaleStart = self.scene().scaleFactor
if self.zoomScaleStart:
if self.animTimer is None:
self.animTimer = self.startTimer(util.ANIM_TIMER_MS)
zoom = self.zoomScaleStart * (now.length() / orig.length()) 
* COEFF
self.zoomAbsolute(zoom)

# oldVValue = self.verticalScrollBar().value()  
  
# vDiff = points[0].lastPos().y() - points[0].pos().y() 
  
# newVValue = oldVValue + vDiff 
  
# self.verticalScrollBar().setValue(newVValue)  
  

# oldHValue = self.horizontalScrollBar().value()
  
# hDiff = points[0].lastPos().x() - points[0].pos().x() 
  
# newHValue = oldHValue + hDiffOA   
  
# self.horizontalScrollBar().setValue(newHValue)
  

if e.type() == QEvent.TouchEnd or e.type() == QEvent.TouchCancel:
self.zoomScaleStart = None
if self.animTimer:
self.killTimer(self.animTimer)
self.animTimer = None
return True
return super().viewportEvent(e)

def zoomAbsolute(self, x):
if x < 0:
x = .001
if self.scene().scaleFactor != x:
self.scene().setScaleFactor(x)
self.scaleWaiting = True

def _setScale(self, x):
self.setTransform(QTransform.fromScale(x, x))

def timerEvent(self, e):
if self.scaleWaiting:
x = self.scene().scaleFactor
self._setScale(x)
self.scaleWaiting = False
if self.panWaiting:
self.centerOn(self.panCenter)
self.panWaiting = False


> On Jul 25, 2017, at 12:27 AM, Christian Gagneraud <chg...@gmail.com> wrote:
> 
> 
> 
> On 25/07/2017 7:24 pm, "Patrick Stinson" <patrickk...@gmail.com 
> <mailto:patrickk...@gmail.com>> wrote:
> Hi there!
> 
> If I am setting a QGraphicsView's scale via setTransform() while scrolling 
> up/down+left/right with two fingers on the trackpad, but the paint updates 
> don’t come until after I stop moving my fingers which stops the wheel events. 
> Is there a way to update the view with the new transform while scrolling
> 
> Can you show your event handlers, difficult to say without seeing except that 
> it should work.
> 
> Chris
> 
> 
> 
> 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>
> 
> 



smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] How to update QGraphicsView transform when scrolling view with wheel?

2017-07-25 Thread Patrick Stinson
Hi there!

If I am setting a QGraphicsView's scale via setTransform() while scrolling 
up/down+left/right with two fingers on the trackpad, but the paint updates 
don’t come until after I stop moving my fingers which stops the wheel events. 
Is there a way to update the view with the new transform while scrolling?

Thanks!

smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] sin wave with QPainterPath between two points

2017-07-20 Thread Patrick Stinson
Also it should be between two arbitrary points, so the sine wave may go from 
top-right to bottom left, for example.

> On Jul 20, 2017, at 1:28 AM, Elvis Stansvik <elvst...@gmail.com> wrote:
> 
> 2017-07-20 10:23 GMT+02:00 Jean-Michaël Celerier
> <jeanmichael.celer...@gmail.com <mailto:jeanmichael.celer...@gmail.com>>:
>> You can just compute the sine directly :
>> 
>>   for(int i = 0; i < width; i++)
>>   {
>> int x = i;
>> int y = height / 2 + amplitude * std::sin(2 * M_PI * freq * i / width +
>> phase);
>> path.lineTo(x, y);
>>   }
> 
> I think he wanted to avoid an approximation with straight lines and
> use cubic beziers.
> 
> Jean-Michaël: There seems to be many pages explaining the theory
> behind sine approximation using Beziers if you Google.
> 
> Elvis
> 
>> 
>> 
>> 
>> 
>> 
>> ---
>> Jean-Michaël Celerier
>> http://www.jcelerier.name
>> 
>> On Thu, Jul 20, 2017 at 9:47 AM, Patrick Stinson <patrickk...@gmail.com>
>> wrote:
>>> 
>>> Hello! I want to figure out how to draw a sin wave between two QPointF’s
>>> using QPainterPath. Calculating the cubic control points seems like the best
>>> way, but I am far from mastering that theory.
>>> 
>>> This is a diagramming app and the goal is to get a squiggly line between
>>> two objects.
>>> 
>>> Thanks!
>>> ___
>>> Interest mailing list
>>> 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 
>> <http://lists.qt-project.org/mailman/listinfo/interest>


smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] sin wave with QPainterPath between two points

2017-07-20 Thread Patrick Stinson
Hello! I want to figure out how to draw a sin wave between two QPointF’s using 
QPainterPath. Calculating the cubic control points seems like the best way, but 
I am far from mastering that theory.

This is a diagramming app and the goal is to get a squiggly line between two 
objects.

Thanks!

smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QGraphicsView selection not honoring QGraphicsItem::shape?

2017-06-25 Thread Patrick Stinson
Cool, thanks for digging into it a little more.

Thanks for the tip on stroking the path for shape(), though I already do that 
as demonstrated in qgraphicsitemc.cpp - I just removed it from the example code 
I posted here :)

Here is a video of it still not working but with your debug code:

https://www.screencast.com/t/j8JaAcL08O


here is the output of qDebug() << item.pos() << item.boundingRect() << 
item.shape():

PyQt5.QtCore.QPointF() PyQt5.QtCore.QRectF(-213.0724192881762, 
-83.55902694078242, 295.58581163557005, 66.7981150101399) 


I have confirmed shape().contains(boundingRect().center()) == false

I wonder if the problem is that my item has no pos()? I am just drawing it in 
relation to the two items that it is connected to. Geeze, if so I wonder how 
that would work when you can drag either of the two items it connects to and it 
just remains in the middle. I guess just listen for their movements and do the 
math to move this item to the center of where it would be drawn…

P.S. gammaray looks amazing.

-P

> On Jun 25, 2017, at 8:17 PM, Christian Gagneraud  wrote:
> 
>  painter.drawPath(boundingRect())



smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QGraphicsView selection not honoring QGraphicsItem::shape?

2017-06-25 Thread Patrick Stinson

> On Jun 25, 2017, at 4:51 PM, Christian Gagneraud <chg...@gmail.com> wrote:
> 
> On 26 June 2017 at 05:10, Patrick Stinson <patrickk...@gmail.com> wrote:
>>def update(self, *args):
>>if None in self.people:
>>return
> 
> you're missing a call to prepareGeometryChange()
> 
>>a = self.mapToScene(self.people[0].bottomCenterScene())
>>b = self.mapToScene(self.people[1].bottomCenterScene())
> 
> The path should be in (this) item coordinates, not scene coordinates.

This item will always be top-level so the coordinates will match the scene. But 
for cleanliness’ sake, how do you convert from scene coordinates to item 
coordinates? I don’t see a method for that.

> 
> 
> Plus you're bounding rect should include the pen width of the path
> you're drawing, eg:
> halfPenWidth = self.pen.width()/2.0;
> return self.path.boundingRect().adjusted(-halfPenWidth, -halfPenWidth
> , halfPenWidth , halfPenWidth )
> 
> Hope this helps.
> 
> Chris



smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QGraphicsView selection not honoring QGraphicsItem::shape?

2017-06-25 Thread Patrick Stinson
Thanks for the important tips, I wasn’t aware of any of them! I implemented all 
of them.

Unfortunately it is still selecting based on boundingRect. Any other thoughts?


> On Jun 25, 2017, at 5:00 PM, Christian Gagneraud <chg...@gmail.com> wrote:
> 
> On 26 June 2017 at 05:10, Patrick Stinson <patrickk...@gmail.com 
> <mailto:patrickk...@gmail.com>> wrote:
>> 
>> Hi there!
>> 
>> I have a simple QGraphicsItem which draws the left, bottom, and right 
>> borders of it’s bounding rect. I am painting the item by creating a 
>> QGraphicsPath from top-left => bottom-left => bottom-right =>? top-right.
>> 
>> I have reimplemented shape() to return this path, but the view is still 
>> using the item’s bounding rect to select. I have tested this by dragging my 
>> selection marquee down through the top border of the item. I tried 
>> re-tracing the QPainterPath back to the beginning in case it was 
>> automatically closing it from top-right to top-left, but it didn’t help.
>> 
>> Is there something else that needs to happen to get the view to honor 
>> shape()?
>> 
>> See code and screenshot below.
>> 
>> Thanks!
>> -Patrick
>> 
>> class Marriage(QGraphicsItem, util.Debug):
>> 
>>def __init__(self, a, b):
>>super().__init__()
>>global last_id
>>self.id = last_id = last_id + 1
>>self.setFlag(QGraphicsItem.ItemIsSelectable, True)
>>self.path = QPainterPath()
>>self.pen = util.PEN
>>self.people = [a, b]
>>self.children = []
>>self.hover = False # highlight
>>self.update()
>> 
>>def boundingRect(self):
>>return self.shape().boundingRect()
>> 
>>def shape(self):
>>return self.path
>> 
>> 
>> 
>>def update(self, *args):
> 
> 
> BTW, update() is not a virtual method, you should instead implement a
> custom function, say updateShape() in which you first call
> prepareGeometryChange(). No need to call update().
> 
> Chris



smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] black screen with iOS app over airplay?

2017-05-16 Thread Patrick Stinson
Mange takk, Tor Arne. I’ll follow the issue there.

> On May 16, 2017, at 11:10 AM, Tor Arne Vestbø <tor.arne.ves...@qt.io> wrote:
> 
> https://bugreports.qt.io/browse/QTBUG-56768 
> <https://bugreports.qt.io/browse/QTBUG-56768>
> 
> On 13/05/2017 18:56, Patrick Stinson wrote:
>> Hmm. This did not work for me and I am starting to realize that there
>> are more problems in the Qt code than we may be aware.
>> 
>> One problem, and maybe the main problem, is that Qt seems to incorrectly
>> rely on the OS view that is created when the app is created, but this
>> view doesn’t persist when airplay is engaged or when it is disengaged. I
>> think any of us could see this problem when you disable airplay
>> mirroring while running a Qt app and the app crashes.
>> 
>> This problem also appears to prevent Reflector 2 from showing the
>> mirrored view of the iPad app when running the Qt app, which I can only
>> interpret to mean that the Qt view is not complying with the OS’s
>> standardized view API. Reflector works fine when another app or
>> launchpad (desktop) is shown.
>> 
>> So there is some work to do here…I wish I was better with UIKit to
>> troubleshoot.
>> 
>> 
>>> On May 12, 2017, at 2:11 PM, bralche...@ics.com
>>> <mailto:bralche...@ics.com <mailto:bralche...@ics.com>> wrote:
>>> 
>>> Yes, I think that’s the one.
>>> 
>>> 
>>> Regards,
>>>Boris Ralchenko.
>>> 
>>> 
>>> 
>>> 
>>> 
>>>> On May 12, 2017, at 5:08 PM, Patrick Stinson <patrickk...@gmail.com 
>>>> <mailto:patrickk...@gmail.com>
>>>> <mailto:patrickk...@gmail.com <mailto:patrickk...@gmail.com>>> wrote:
>>>> 
>>>> Do you mean QMainWindow? That is the class that I am deriving from.
>>>> 
>>>> On May 12, 2017, at 1:38 PM, bralche...@ics.com <mailto:bralche...@ics.com>
>>>> <mailto:bralche...@ics.com <mailto:bralche...@ics.com>> wrote:
>>>> 
>>>>> On main window, in our case it was derived from QQuickView.
>>>>> 
>>>>> Regards,
>>>>>Boris Ralchenko.
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>> On May 12, 2017, at 4:33 PM, Patrick Stinson <patrickk...@gmail.com 
>>>>>> <mailto:patrickk...@gmail.com>
>>>>>> <mailto:patrickk...@gmail.com <mailto:patrickk...@gmail.com>>> wrote:
>>>>>> 
>>>>>> Oh excellent. Which object do you call setGeometry on?
>>>>>> 
>>>>>> On May 12, 2017, at 1:13 PM, bralche...@ics.com 
>>>>>> <mailto:bralche...@ics.com>
>>>>>> <mailto:bralche...@ics.com <mailto:bralche...@ics.com>> wrote:
>>>>>> 
>>>>>>> Patrick,
>>>>>>> 
>>>>>>> you have to setGeometry(QRect screenGeometry) explicitly.
>>>>>>> screenGeometry should be queried from iOS directly, like this:
>>>>>>> 
>>>>>>> constCGRectr=[[UIScreenmainScreen]bounds];
>>>>>>> returnQRect(0,0,r.size.width,r.size.height);
>>>>>>> 
>>>>>>> 
>>>>>>> We had similar problem, black screen with AirPlay or with HDMI
>>>>>>> dongle. This solved it for us.
>>>>>>> 
>>>>>>> Regards,
>>>>>>>Boris Ralchenko.
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>>> On May 11, 2017, at 9:16 PM, Patrick Stinson
>>>>>>>> <patrickk...@gmail.com <mailto:patrickk...@gmail.com> 
>>>>>>>> <mailto:patrickk...@gmail.com <mailto:patrickk...@gmail.com>>> wrote:
>>>>>>>> 
>>>>>>>> Hello! Has anyone else had a problem with Qt apps only showing as
>>>>>>>> a black screen when mirroring an iOS device over airplay? Other
>>>>>>>> apps display fine, but then the AirPlay display turns black when
>>>>>>>> the Qt app is brought to the front.
>>>>>>>> 
>>>>>>>> Granted, I am using Reflector 2 to show the iPad screen on my Mac
>>>>>>>> with latest macOS Sierra, (in order to show the iPad on a
>>>>>>>> projector), but it just uses the AirPlay protocol on the iOS end
>>>>>>>> so I assume it is a problem with the Qt iOS view.
>>>>>>>> 
>>>>>>>> Thanks!___
>>>>>>>> Interest mailing list
>>>>>>>> Interest@qt-project.org <mailto:Interest@qt-project.org> 
>>>>>>>> <mailto: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>


smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] black screen with iOS app over airplay?

2017-05-13 Thread Patrick Stinson
Hmm. This did not work for me and I am starting to realize that there are more 
problems in the Qt code than we may be aware.

One problem, and maybe the main problem, is that Qt seems to incorrectly rely 
on the OS view that is created when the app is created, but this view doesn’t 
persist when airplay is engaged or when it is disengaged. I think any of us 
could see this problem when you disable airplay mirroring while running a Qt 
app and the app crashes.

This problem also appears to prevent Reflector 2 from showing the mirrored view 
of the iPad app when running the Qt app, which I can only interpret to mean 
that the Qt view is not complying with the OS’s standardized view API. 
Reflector works fine when another app or launchpad (desktop) is shown.

So there is some work to do here…I wish I was better with UIKit to troubleshoot.


> On May 12, 2017, at 2:11 PM, bralche...@ics.com wrote:
> 
> Yes, I think that’s the one. 
> 
> 
> Regards,
> Boris Ralchenko.
> 
> 
> 
> 
> 
>> On May 12, 2017, at 5:08 PM, Patrick Stinson <patrickk...@gmail.com 
>> <mailto:patrickk...@gmail.com>> wrote:
>> 
>> Do you mean QMainWindow? That is the class that I am deriving from.
>> 
>> On May 12, 2017, at 1:38 PM, bralche...@ics.com <mailto:bralche...@ics.com> 
>> wrote:
>> 
>>> On main window, in our case it was derived from QQuickView. 
>>> 
>>> Regards,
>>> Boris Ralchenko.
>>> 
>>> 
>>> 
>>> 
>>> 
>>>> On May 12, 2017, at 4:33 PM, Patrick Stinson <patrickk...@gmail.com 
>>>> <mailto:patrickk...@gmail.com>> wrote:
>>>> 
>>>> Oh excellent. Which object do you call setGeometry on?
>>>> 
>>>> On May 12, 2017, at 1:13 PM, bralche...@ics.com 
>>>> <mailto:bralche...@ics.com> wrote:
>>>> 
>>>>> Patrick,
>>>>> 
>>>>> you have to setGeometry(QRect screenGeometry) explicitly. screenGeometry 
>>>>> should be queried from iOS directly, like this:
>>>>> 
>>>>> const CGRect r = [[UIScreen mainScreen] bounds];
>>>>> return QRect(0, 0, r.size.width, r.size.height);
>>>>> 
>>>>> 
>>>>> We had similar problem, black screen with AirPlay or with HDMI dongle. 
>>>>> This solved it for us.
>>>>>
>>>>> Regards,
>>>>> Boris Ralchenko.
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>> On May 11, 2017, at 9:16 PM, Patrick Stinson <patrickk...@gmail.com 
>>>>>> <mailto:patrickk...@gmail.com>> wrote:
>>>>>> 
>>>>>> Hello! Has anyone else had a problem with Qt apps only showing as a 
>>>>>> black screen when mirroring an iOS device over airplay? Other apps 
>>>>>> display fine, but then the AirPlay display turns black when the Qt app 
>>>>>> is brought to the front.
>>>>>> 
>>>>>> Granted, I am using Reflector 2 to show the iPad screen on my Mac with 
>>>>>> latest macOS Sierra, (in order to show the iPad on a projector), but it 
>>>>>> just uses the AirPlay protocol on the iOS end so I assume it is a 
>>>>>> problem with the Qt iOS view.
>>>>>> 
>>>>>> 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>
>>>>> 
>>> 
> 



smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] black screen with iOS app over airplay?

2017-05-12 Thread Patrick Stinson
Do you mean QMainWindow? That is the class that I am deriving from.

> On May 12, 2017, at 1:38 PM, bralche...@ics.com wrote:
> 
> On main window, in our case it was derived from QQuickView. 
> 
> Regards,
> Boris Ralchenko.
> 
> 
> 
> 
> 
>> On May 12, 2017, at 4:33 PM, Patrick Stinson <patrickk...@gmail.com> wrote:
>> 
>> Oh excellent. Which object do you call setGeometry on?
>> 
>>> On May 12, 2017, at 1:13 PM, bralche...@ics.com wrote:
>>> 
>>> Patrick,
>>> 
>>> you have to setGeometry(QRect screenGeometry) explicitly. screenGeometry 
>>> should be queried from iOS directly, like this:
>>> 
>>> const CGRect r = [[UIScreen mainScreen] bounds];
>>> return QRect(0, 0, r.size.width, r.size.height);
>>> 
>>> 
>>> We had similar problem, black screen with AirPlay or with HDMI dongle. This 
>>> solved it for us.
>>>
>>> Regards,
>>> Boris Ralchenko.
>>> 
>>> 
>>> 
>>> 
>>> 
>>>> On May 11, 2017, at 9:16 PM, Patrick Stinson <patrickk...@gmail.com> wrote:
>>>> 
>>>> Hello! Has anyone else had a problem with Qt apps only showing as a black 
>>>> screen when mirroring an iOS device over airplay? Other apps display fine, 
>>>> but then the AirPlay display turns black when the Qt app is brought to the 
>>>> front.
>>>> 
>>>> Granted, I am using Reflector 2 to show the iPad screen on my Mac with 
>>>> latest macOS Sierra, (in order to show the iPad on a projector), but it 
>>>> just uses the AirPlay protocol on the iOS end so I assume it is a problem 
>>>> with the Qt iOS view.
>>>> 
>>>> Thanks!___
>>>> 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] black screen with iOS app over airplay?

2017-05-12 Thread Patrick Stinson
Oh excellent. Which object do you call setGeometry on?

> On May 12, 2017, at 1:13 PM, bralche...@ics.com wrote:
> 
> Patrick,
> 
> you have to setGeometry(QRect screenGeometry) explicitly. screenGeometry 
> should be queried from iOS directly, like this:
> 
> const CGRect r = [[UIScreen mainScreen] bounds];
> return QRect(0, 0, r.size.width, r.size.height);
> 
> 
> We had similar problem, black screen with AirPlay or with HDMI dongle. This 
> solved it for us.
>
> Regards,
> Boris Ralchenko.
> 
> 
> 
> 
> 
>> On May 11, 2017, at 9:16 PM, Patrick Stinson <patrickk...@gmail.com> wrote:
>> 
>> Hello! Has anyone else had a problem with Qt apps only showing as a black 
>> screen when mirroring an iOS device over airplay? Other apps display fine, 
>> but then the AirPlay display turns black when the Qt app is brought to the 
>> front.
>> 
>> Granted, I am using Reflector 2 to show the iPad screen on my Mac with 
>> latest macOS Sierra, (in order to show the iPad on a projector), but it just 
>> uses the AirPlay protocol on the iOS end so I assume it is a problem with 
>> the Qt iOS view.
>> 
>> Thanks!___
>> 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] black screen with iOS app over airplay?

2017-05-11 Thread Patrick Stinson
Hello! Has anyone else had a problem with Qt apps only showing as a black 
screen when mirroring an iOS device over airplay? Other apps display fine, but 
then the AirPlay display turns black when the Qt app is brought to the front.

Granted, I am using Reflector 2 to show the iPad screen on my Mac with latest 
macOS Sierra, (in order to show the iPad on a projector), but it just uses the 
AirPlay protocol on the iOS end so I assume it is a problem with the Qt iOS 
view.

Thanks!

smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Slow touch event sample rate after 10.3.1 iOS sdk

2017-04-23 Thread Patrick Stinson
Has anyone else noticed that the sample rate for touch events has dropped to 
800ms since the last iOS SDK update? I have tested with both Qt-5.8.0 and 
Qt-dev and it’s happening on my iPhone as well as iPad pro.

I read somewhere that you have to update the view in order to get the sample 
rate to increase back to the usual 60Hz. Maybe this is intended to save battery 
life? I’m not even sure if I’m right.

Also not sure how to make a workaround. This problem doesn’t occur for example 
when dragging a QGraphicsItem around, maybe because that uses mouse events? It 
does happen when I listen to QEvent::TouchMove, for example doing finger-based 
painting which now only creates broad, jagged lines with a 1.1Hz sampling 
frequency.

I hope a whole bunch of released Qt apps didn’t just break!

-P

smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] speeding up "make clean" in qt src on OS X?

2017-04-20 Thread Patrick Stinson
Thank you for that explanation. I pulled Qt from git and don't remember the 
option to download specific modules but will look at the docs to find out how. 
Very good suggestion.

> On Apr 20, 2017, at 11:28 AM, Thiago Macieira <thiago.macie...@intel.com> 
> wrote:
> 
> Em quinta-feira, 20 de abril de 2017, às 01:34:10 PDT, Patrick Stinson 
> escreveu:
>> Running “make clean” in the root qt src dir calls xcodebuild a whole bunch
>> of times and takes a really, really long time. Is there any faster way to
>> do this? I am already excluding a lot of unnecessary builds in my configure
>> line:
>> 
>> ./configure -static -debug-and-release -nomake examples -xplatform macx-ios-
>> clang -sdk iphoneos -nomake tests
> 
> Konstantin's answer is the best way, but here's what's happening for you. You 
> used -nomake examples -nomake tests, so the Makefiles for the examples were 
> not 
> created. But when you ran make clean, it tried to clean the examples and 
> tests 
> too:
> 
>> cd qopenglwindow/ && ( test -e Makefile ||
>> /Users/patrick/dev/vendor/pyqt-sysroot-ios-64/src/qt5/qtbase/bin/qmake -o
>> Makefile
>> /Users/patrick/dev/vendor/pyqt-sysroot-ios-64/src/qt5/qtbase/tests/auto/gui
>> /kernel/qopenglwindow/qopenglwindow.pro )
> 
> In order to clean there, it needs to create the Makefile there first. Yes, 
> it's 
> wasteful because obviously there's nothing to be cleaned if there's no 
> Makefile 
> in the first place.
> 
> It's a qmake shortcoming. So there's nothing you can do to speed up make 
> clean 
> in the top dir.
> 
> Do what Konstantin said.
> 
> One more thing: your configure line had a LOT of -skip. If you didn't want 
> those modules, why did you download them? If all you wanted was qtbase, 
> download qtbase only.
> 
> -- 
> Thiago Macieira - thiago.macieira (AT) intel.com
>  Software Architect - Intel Open Source Technology Center
> 
> ___
> 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] speeding up "make clean" in qt src on OS X?

2017-04-20 Thread Patrick Stinson
I googled it. Just start with a clean or distclean'ed qt src dir and call 
configure from another dir.

cd my-qt5-build && ../path/to/qt/src/configure && make


> On Apr 20, 2017, at 5:02 AM, Nuno Santos <nunosan...@imaginando.pt> wrote:
> 
> How do you make out of the tree builds? How should one call the configure 
> command for that? 
> 
>> On 20 Apr 2017, at 09:58, Patrick Stinson <patrickk...@gmail.com 
>> <mailto:patrickk...@gmail.com>> wrote:
>> 
>> Ah! I was not aware that you could do that. Thank you!
>> 
>> -P
>> 
>>> On Apr 20, 2017, at 4:48 AM, Konstantin Tokarev <annu...@yandex.ru 
>>> <mailto:annu...@yandex.ru>> wrote:
>>> 
>>> out-of-tree
>> 
>> ___
>> Interest mailing list
>> Interest@qt-project.org <mailto:Interest@qt-project.org>
>> http://lists.qt-project.org/mailman/listinfo/interest
> 



smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] speeding up "make clean" in qt src on OS X?

2017-04-20 Thread Patrick Stinson
Ah! I was not aware that you could do that. Thank you!

-P

> On Apr 20, 2017, at 4:48 AM, Konstantin Tokarev  wrote:
> 
> out-of-tree



smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] speeding up "make clean" in qt src on OS X?

2017-04-20 Thread Patrick Stinson
Hello!

Running “make clean” in the root qt src dir calls xcodebuild a whole bunch of 
times and takes a really, really long time. Is there any faster way to do this? 
I am already excluding a lot of unnecessary builds in my configure line:

./configure -static -debug-and-release -nomake examples -xplatform 
macx-ios-clang -sdk iphoneos -nomake tests -skip qt3d -skip qtactiveqt -skip 
qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip 
qtdatavis3d -skip qtdeclarative -skip qtdoc -skip qtdocgallery -skip qtenginio 
-skip qtfeedback -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats 
-skip qtlocation -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip 
qtpim -skip qtqa -skip qtquick1 -skip qtquickcontrols -skip qtquickcontrols2 
-skip qtrepotools -skip qtscript -skip qtscxml -skip qtserialbus -skip 
qtserialport -skip qtspeech -skip qtsvg -skip qtsystems -skip qttools -skip 
qttranslations -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip 
qtwebengine -skip qtwebkit -skip qtwebkit-examples -skip qtwebsockets -skip 
qtwebview -skip qtwinextras -skip qtx11extras -developer-build -opensource 
-confirm-license

and it still runs a bunch of xcodebuild calls like this:

rm -f .obj/tst_qpixelformat_plugin_import.o
rm -f *~ core *.core
cd qopenglwindow/ && ( test -e Makefile || 
/Users/patrick/dev/vendor/pyqt-sysroot-ios-64/src/qt5/qtbase/bin/qmake -o 
Makefile 
/Users/patrick/dev/vendor/pyqt-sysroot-ios-64/src/qt5/qtbase/tests/auto/gui/kernel/qopenglwindow/qopenglwindow.pro
 ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile clean
xcodebuild clean  -project tst_qopenglwindow.xcodeproj -scheme 
tst_qopenglwindow   -configuration Debug  -destination generic/platform=iOS 
-destination-timeout 1 
=== CLEAN AGGREGATE TARGET Qt Preprocess OF PROJECT tst_qopenglwindow WITH 
CONFIGURATION Debug ===

Check dependencies

Clean.Remove clean .obj/tst_qopenglwindow.build/Debug-iphoneos/Qt\ 
Preprocess.build
builtin-rm -rf 
/Users/patrick/dev/vendor/pyqt-sysroot-ios-64/src/qt5/qtbase/tests/auto/gui/kernel/qopenglwindow/.obj/tst_qopenglwindow.build/Debug-iphoneos/Qt\
 Preprocess.build

=== CLEAN TARGET tst_qopenglwindow OF PROJECT tst_qopenglwindow WITH 
CONFIGURATION Debug ===

Check dependencies

Create product structure
/bin/mkdir -p 
/Users/patrick/dev/vendor/pyqt-sysroot-ios-64/src/qt5/qtbase/tests/auto/gui/kernel/qopenglwindow/Debug-iphoneos/tst_qopenglwindow.app

Clean.Remove clean Debug-iphoneos/tst_qopenglwindow.app
builtin-rm -rf 
/Users/patrick/dev/vendor/pyqt-sysroot-ios-64/src/qt5/qtbase/tests/auto/gui/kernel/qopenglwindow/Debug-iphoneos/tst_qopenglwindow.app

Clean.Remove clean 
.obj/tst_qopenglwindow.build/Debug-iphoneos/tst_qopenglwindow.build
builtin-rm -rf 
/Users/patrick/dev/vendor/pyqt-sysroot-ios-64/src/qt5/qtbase/tests/auto/gui/kernel/qopenglwindow/.obj/tst_qopenglwindow.build/Debug-iphoneos/tst_qopenglwindow.build

** CLEAN SUCCEEDED **


Thanks!
-P

smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] iOS: QPropertyAnimation on QWidget.pos not hardware accelerated?

2017-04-08 Thread Patrick Stinson
Hi there!

I have a simple QWidget with a single (empty) list view that I am trying to use 
for a fullscreen slide-in panel on iOS. The problem is that the animation of 
the ‘pos’ property doesn’t look hardware accelerated on iOS. It looks great on 
macOS, however. The slide-out widget is covering a GL widget which is itself 
performing very well although not taking any cpu when the slide-out is 
animating.

Any thoughts?

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


[Interest] Prevent QGraphicsView calling fitInView() after addItem()

2017-04-06 Thread Patrick Stinson
Hi there!

It appears that the default behavior for QGraphicsView is to call fitInView() 
to center all the items in the scene when a new item is added. Is there a way 
to prevent this? I don’t see anything in the docs.

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


  1   2   >