Re: [Interest] Qt 6 Universal binaries for Mac OS?

2021-09-22 Thread Croitor Alexandru
Hi,

Seems like the doc snapshots haven't been indexed by search engines yet
(from my results at least).

See https://doc-snapshots.qt.io/qt6-6.2/macos.html#architectures

You can specify the relevant options in Creator's Project pane for either
build system.

On Wed, Sep 22, 2021 at 10:38 PM Wesley Krasko  wrote:

> Hello all. We have been waiting for Qt 6.2 for universal binary support.
> I have 6.2 RC and have our app building and running fine in Creator (for
> Intel on an Intel machine, Big Sur, Xcode 12).
> Does anyone know how to then create the universal binaries? I have found
> documentation on building Qt for both architectures, but that's irrelevant
> as we use the pre-compiled Qt downloaded through the maintenance tool.
> Our current process has been to dev/build the app in Creator (we do not
> use Xcode, find Creator much easier and more user friendly). Once done, I
> copy the bundle somewhere, run macdeployqt on it, sign it, then
> notarize it. Of course there's some details in between but that's
> essentially it, I have a pkg to distribute.
> I'm not seeing in Creator now how to create a universal binary, or finding
> any docs.
> Thanks!
>
> --
> Wes Krasko
> www.worldwidewes.com
> www.kraskofamily.com
> "Stay away from negative people. They have a problem for every solution."
>
> ___
> 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] Qt 6 Universal binaries for Mac OS?

2021-09-22 Thread Wesley Krasko
Hello all. We have been waiting for Qt 6.2 for universal binary support.
I have 6.2 RC and have our app building and running fine in Creator (for
Intel on an Intel machine, Big Sur, Xcode 12).
Does anyone know how to then create the universal binaries? I have found
documentation on building Qt for both architectures, but that's irrelevant
as we use the pre-compiled Qt downloaded through the maintenance tool.
Our current process has been to dev/build the app in Creator (we do not
use Xcode, find Creator much easier and more user friendly). Once done, I
copy the bundle somewhere, run macdeployqt on it, sign it, then
notarize it. Of course there's some details in between but that's
essentially it, I have a pkg to distribute.
I'm not seeing in Creator now how to create a universal binary, or finding
any docs.
Thanks!

-- 
Wes Krasko
www.worldwidewes.com
www.kraskofamily.com
"Stay away from negative people. They have a problem for every solution."
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] [External]Re: Proxied view not updating live when source model does

2021-09-22 Thread Murphy, Sean
Thanks for the response, but no, that’s not it. Modifying my baseModel’s 
setData from
emit dataChanged(index, index, QVector() << role);
to
emit dataChanged(index, index, QVector() << role << Qt::DisplayRole);
changes nothing in the behavior…

From: Interest  On Behalf Of Björn Schäpers
Sent: Wednesday, September 22, 2021 2:46 PM
To: interest@qt-project.org
Subject: [External]Re: [Interest] Proxied view not updating live when source 
model does

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe.

You emit dataChanged with the given role (which is Qt::EditRole), but not for 
Qt::DisplayRole. Is it that?

Regards,
Björn.

Am 20.09.2021 um 19:15 schrieb Murphy, Sean:

I'm having an issue where my proxy model and its associated view aren't 
updating live when changes

are made in the source model.



My proxy model simply is attempting to invert the rows of the source model. So 
it inherits from a

QSortFilterProxyModel and implements mapFromSource() and mapToSource() as 
follows:



QModelIndex invertRowsModel::mapFromSource(const QModelIndex ) 
const

{

if(sourceIndex.isValid() && rowCount() > 0)

{

return this->index(rowCount() - sourceIndex.row() - 1, 
sourceIndex.column());

}



return QModelIndex();

}



QModelIndex invertRowsModel::mapToSource(const QModelIndex ) 
const

{

if(proxyIndex.isValid() && sourceModel() && rowCount() > 0)

{

return sourceModel()->index(rowCount() - proxyIndex.row() - 1, 
proxyIndex.column());

}



return QModelIndex();

}



I load up my source model with some data, connect the models up to their 
respective views,

connect the source model to the proxy and launch the application. The original 
views are

correct - the proxied rows are flipped when compared to the source model. But 
then if the

user makes a change to some of the data in the source model's view, the 
corresponding index

in proxy model's view is NOT updated automatically. HOWEVER, if the user then 
clicks within

the proxy view, or clicks outside of my application, the proxy model will then 
repaint and the

updated information is correctly shown.



I've attached a minimal example that shows the behavior. Things to note:

1. When the source model emits its dataChanged(), this seems to trigger a 
dataChanged()

  emission in the proxy model as well. The weird (at least to me) thing is that 
both of those

  signals have the SAME model index row & column numbers. I would have expected 
that

  when the source model emits data changed, that the proxy model would 
translate the

  source model's indices into the proper proxy model's indices via the 
mapFromSource()

  function and then emit dataChanged() with those indices. I've got debug 
statements in

  my example to illustrate that no dataChanged() translation is happening - if 
the user

  updates data in row 0 in the source model's view, the proxy model also emits 
that data

  changed in its row 0, but that isn't the correct row for the proxy.

2. We discovered that if we connect the proxy model's dataChanged() signal to a 
custom

  slot within the proxy model, and have that slot emit layoutChanged() then we 
can get

  the live update behavior when the source model updates. This is at line 25 of

  invertrowsmodel.cpp. It's commented out initially, but if you uncomment it 
and re-run

  the app then proxy view does update instantly. Other similar signals would 
work as well -

  we just need something triggers the proxy view to refresh the data in the 
proxied view,

  but we don't think we should really have to do this...

3. I have a second view attached to the source model and both source model 
views update

  each other live - changes in one source model view are instantly updated in 
the other

  source model view, but not in the proxy model view without further user 
interaction

  (or by emitting that layoutChanged() signal)



Any thoughts as to why the proxy model isn't updating correctly?

Sean



___

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] Proxied view not updating live when source model does

2021-09-22 Thread Björn Schäpers
You emit dataChanged with the given role (which is Qt::EditRole), but not for 
Qt::DisplayRole. Is it that?


Regards,
Björn.

Am 20.09.2021 um 19:15 schrieb Murphy, Sean:

I'm having an issue where my proxy model and its associated view aren't 
updating live when changes
are made in the source model.

My proxy model simply is attempting to invert the rows of the source model. So 
it inherits from a
QSortFilterProxyModel and implements mapFromSource() and mapToSource() as 
follows:

 QModelIndex invertRowsModel::mapFromSource(const QModelIndex ) 
const
 {
 if(sourceIndex.isValid() && rowCount() > 0)
 {
 return this->index(rowCount() - sourceIndex.row() - 1, 
sourceIndex.column());
 }

 return QModelIndex();
 }

 QModelIndex invertRowsModel::mapToSource(const QModelIndex ) 
const
 {
 if(proxyIndex.isValid() && sourceModel() && rowCount() > 0)
 {
 return sourceModel()->index(rowCount() - proxyIndex.row() - 1, 
proxyIndex.column());
 }

 return QModelIndex();
 }

I load up my source model with some data, connect the models up to their 
respective views,
connect the source model to the proxy and launch the application. The original 
views are
correct - the proxied rows are flipped when compared to the source model. But 
then if the
user makes a change to some of the data in the source model's view, the 
corresponding index
in proxy model's view is NOT updated automatically. HOWEVER, if the user then 
clicks within
the proxy view, or clicks outside of my application, the proxy model will then 
repaint and the
updated information is correctly shown.

I've attached a minimal example that shows the behavior. Things to note:
1. When the source model emits its dataChanged(), this seems to trigger a 
dataChanged()
   emission in the proxy model as well. The weird (at least to me) thing is 
that both of those
   signals have the SAME model index row & column numbers. I would have 
expected that
   when the source model emits data changed, that the proxy model would 
translate the
   source model's indices into the proper proxy model's indices via the 
mapFromSource()
   function and then emit dataChanged() with those indices. I've got debug 
statements in
   my example to illustrate that no dataChanged() translation is happening - if 
the user
   updates data in row 0 in the source model's view, the proxy model also emits 
that data
   changed in its row 0, but that isn't the correct row for the proxy.
2. We discovered that if we connect the proxy model's dataChanged() signal to a 
custom
   slot within the proxy model, and have that slot emit layoutChanged() then we 
can get
   the live update behavior when the source model updates. This is at line 25 of
   invertrowsmodel.cpp. It's commented out initially, but if you uncomment it 
and re-run
   the app then proxy view does update instantly. Other similar signals would 
work as well -
   we just need something triggers the proxy view to refresh the data in the 
proxied view,
   but we don't think we should really have to do this...
3. I have a second view attached to the source model and both source model 
views update
   each other live - changes in one source model view are instantly updated in 
the other
   source model view, but not in the proxy model view without further user 
interaction
   (or by emitting that layoutChanged() signal)

Any thoughts as to why the proxy model isn't updating correctly?
Sean

___
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] Proxied view not updating live when source model does

2021-09-22 Thread Murphy, Sean
> to both rowCount() and columnCount() removed those errors and now my
> application runs silently.

I should have explained better. It runs silently in the sense that 
the QAbstractItemModelTester instances aren't printing out 
any information any more.

The broken behavior still exists where the view connected to the 
proxy model isn't repainting the corresponding row as the source 
model's data changes. Instead it is repainting the same row as 
the source.

For example:  
1. If initially populate the source model with 3 rows of data
  A  1
  B  2
  C  3
  The proxied view correctly shows this data inverted:
  C 3
  B 2
  A 1
2. If I then edit cell (0,0) in the source view from 'A' to 'Z':
  Z  1
  B  2
  C  3
  The proxied view doesn't update, still showing an 'A' in cell 
  (2,0) which is supposed to map to source (0,0):
  C 3
  B 2
  A 1
3. If I then edit cell (2,0) in the source view from 'C' to 'X':
  Z  1
  B  2
  X  3
  The proxy view updates to:
  C 3
  B 2
  Z 1

I still think the problem is that the dataChanged() signal that 
automatically gets emitted by the proxy model off from the 
source model's dataChanged() signal has the EXACT SAME 
INDEX as the source model:

"baseModel::slotDataChanged: Index: (2, 0)"
"invertRowsModel::slotDataChanged: Index: (2, 0)"

I think the correct behavior for the proxy should be that when 
the source's dataChanged() signal fires, the indices in that 
signal should be translated through mapFromSource() to then 
get re-emitted from the proxy model so the attached view would 
then call the proxy's data() with the mapped index (in this example, 
when source data changes at (2,0) the proxied view should be 
informed that index (0,0) changed to refresh that data), but that 
doesn't seem to be happening automatically...

Sean

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


[Interest] New open source PDF support library for Qt + serveral PDF applications

2021-09-22 Thread Jakub Melka

Dear Qt users,

I would like to inform you about my project, PDF4QT. I began this 
project in year 2018 as my private project, and now, I think, it is 
ready to be released for public beta testing. Long term goal of this 
project is to offer full support of PDF 2.0 specification as add-on 
library for Qt. I know, that Qt offers its own PDF module, but, it lacks 
many functionality. My project offers much more, as optional content 
handling, signature verification, encryption support, form filling, 
color management, annotations, text to speech, optimalization, sensitive 
content redaction, page manipulation, document merging and splitting and 
much more. Also, I offer several applications, which use this library, 
such as document viewer/editor, or command line tool.


I am aware, that some other projects also implements this functionality, 
but they are very often using viral licenses such as GPL/AGPL. I want to 
be more benevolent, so PDF4QT project uses LGPL license, version 3, so 
it is usable also in commercial applications. I do not want to restrict 
people from using my library.


Project can be found at this website:
https://github.com/JakubMelka/PDF4QT

And public beta release is available here:
https://github.com/JakubMelka/PDF4QT/releases

I hope you will find my 3-year work useful.

PS. I will be very happy if you can contribute in a form of testing, 
advices, opinions... But I also want to keep control of the rights to my 
project, so if you want to contribute, Contributor License Agreement 
must be signed.


Please do not respond on my email, but if you want to discuss this 
software, use following discussion forum:

https://github.com/JakubMelka/PDF4QT/discussions

Best regards

Jakub Melka

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


Re: [Interest] Proxied view not updating live when source model does

2021-09-22 Thread Murphy, Sean
> > have you run  QAbstractItemModelTester
> > https://doc.qt.io/qt-6/qabstractitemmodeltester.html on the source
> > model and the proxy model?

Ok, I think I'm now using the tester, but I'm not sure I'm using it correctly. 
After I've populated my base model, assigned it as the source model to my 
proxy, and then connected the models up to their respective views I call:

QAbstractItemModelTester* baseModelTester = new 
QAbstractItemModelTester(mBaseModel,
 
QAbstractItemModelTester::FailureReportingMode::Warning,
 
this);
QAbstractItemModelTester* proxyModelTester = new 
QAbstractItemModelTester(mInvertRowsProxy,
  
QAbstractItemModelTester::FailureReportingMode::Warning,
  
this);

And then run the rest of my application normally. On first launch after adding 
those lines I saw the following statement twice in QtCreator's Application 
Output pane:

  qt.modeltest: FAIL! model->hasChildren(topIndex) () returned FALSE 
(qabstractitemmodeltester.cpp:366)

A quick google on that pointed to the fact that I was always returning my data 
size for rowCount() and 2 for columnCount() regardless of whether the parent 
index was valid or not. So adding:

if(parent.isValid())
{
return 0;
}

to both rowCount() and columnCount() removed those errors and now my 
application runs silently.

Am I using the model index tester correctly?
Any other ideas on how to get this working?

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


Re: [Interest] [External]Re: [External] Proxied view not updating live when source model does

2021-09-22 Thread Murphy, Sean
> have you run  QAbstractItemModelTester
> https://doc.qt.io/qt-6/qabstractitemmodeltester.html on the source model and
> the proxy model?

I had not, mostly because I didn't know it existed! Time to learn a new class 
today. 
I'll report back if I find something that fixes my issue.

Thanks,
Sean

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


Re: [Interest] [External] Proxied view not updating live when source model does

2021-09-22 Thread Friedemann Kleint

Hi,

have you run  QAbstractItemModelTester 
https://doc.qt.io/qt-6/qabstractitemmodeltester.html on the source model 
and the proxy model?


It usually quickly reveals issues in the overridden methods.

Regards, Friedemann
--

Friedemann Kleint
The Qt Company GmbH

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