[Qgis-developer] QGIS setup with Qt 5 on mac

Larry Shaffer larrys at dakotacarto.com
Fri Nov 18 13:43:50 PST 2016


Hi Nyall,

On Thu, Nov 17, 2016 at 7:11 PM, Nyall Dawson <nyall.dawson at gmail.com>
wrote:

> On 18 November 2016 at 11:55, Larry Shaffer <larrys at dakotacarto.com>
> wrote:
> > Hi,
> >
> > Quick update. Success! I've finally built QGIS 3 master branch off of
> > unmodified Homebrew dependencies, though had to edit several bits of
> source
> > code and pull some hair out.
>
>
> Nice work! I'm very keen to see if this fixes some issues we have with
> OSX. Specifically, if you remove the ifdef from
> https://github.com/qgis/QGIS/blob/master/src/gui/qgscolorbutton.cpp#L505
>
> Does the color picker work?
>

Yes and no. When enabling the picker, from the new styling dock, then
clicking on the map canvas, it works great (no change in cursor to an
eyedropper, though). Guessing this is because the dock is not modal, and
the 'constraining' widget is the whole QMainWindow of QgisApp.

However, open the same layer styling as a modal dialog and there is no
picking beyond the dialog's widget. Every mouse event beyond the dialog,
e.g. over map canvas, is blocked until the mouse reenters the dialog, then
it appears to 'catch up' and samples the entry edge to the dialog. It even
does so after a short timeout, without clicking anything.

While it might be possible to disable the picker if some widget parent in
the hierarchy is modal, but this would nix the ability to work with a
rendering inside of the same modal widget (e.g. if there was a preview
inside of the widget that the user might sample).

Might be able to fake it somehow, by taking a screen shot upon choosing the
picker, then maybe getting the mouse's location and grabbing the color from
the mapped screen snap x/y, but still not sure how to get the mouse
location outside of the modal widget (though, I have not given it a try).

Could use a keyboard focus and a keystoke to do the sampling, while the
color well is updated live from the mouses x/y coords, instead of finding
some way to access the blocked mouse click events. Again, haven't tried any
of this.


> And if you remove
> https://github.com/qgis/QGIS/blob/master/src/app/qgisapp.cpp#L2007
>
> Do preview modes work?


Apparently. Switching modes, and back to normal, works. Not sure I known
whether what I am seeing is correct for the color-blindness settings, but
they do change the rendering of the geotiff I was testing. Would need
reference images for manual comparison.

Larry Shaffer
Dakota Cartography
Black Hills, South Dakota

>
> Nyall
>
>
> >
> > QGIS version: 2.99.0-Master
> > QGIS code revision: 6727ea7
> > Compiled against: Qt 5.7.0
> > Running against Qt: 5.7.0
> > Compiled against GDAL/OGR: 2.1.2
> > Running against GDAL/OGR: 2.1.2
> > Compiled against GEOS: 3.5.0-CAPI-1.9.0
> > Running against GEOS: 3.5.0-CAPI-1.9.0 r4084
> > PostgreSQL Client Version: 9.6.1
> > SpatiaLite Version: 4.3.0a
> > QWT Version: 6.1.3
> > PROJ.4 Version: 493
> > QScintilla2 Version: 2.9.3
> > This copy of QGIS writes debugging output.
> >
> > and Python 3.5.2.
> >
> > http://drive.dakotacarto.com/qgis/qgis3-master_homewbrew-macos-10.11.png
> >
> > It's take me a bit more time to commit proper changes, create the
> qgis3-dev
> > formula and add the docs for:
> >
> > https://github.com/qgis/homebrew-qgisdev
> >
> > Is anyone else already developing QGIS 3 master on Mac?
> >
> > Regards,
> >
> > Larry Shaffer
> > Dakota Cartography
> > Black Hills, South Dakota
> >
> > On Tue, Nov 8, 2016 at 1:02 PM, Rouzaud Denis <denis.rouzaud at gmail.com>
> > wrote:
> >>
> >> Hi Larry,
> >>
> >> Thanks a lot for tackling this!
> >> Glad to read it’ll land soon, but no pressure ;)
> >>
> >> Cheers,
> >> Denis
> >>
> >>
> >> On 8 Nov 2016, at 18:13, Larry Shaffer <larrys at dakotacarto.com> wrote:
> >>
> >> Hi,
> >>
> >> On Sun, Nov 6, 2016 at 7:23 PM, Etienne Trimaille
> >> <etienne.trimaille at gmail.com> wrote:
> >>>
> >>> Thanks David and Matthias for providing some feedbacks about QGIS 3 on
> >>> mac.
> >>> I also would like QGIS 3 compiling on mac.
> >>>
> >>> I hope you will update the install.md on the repo when you will have a
> >>> working workflow ? Thanks
> >>
> >>
> >> I have been preparing Homebrew and OSGeo4Mac 'taps' for this move and am
> >> now focusing on QGIS 3 formulae, probably starting on Thursday or
> Friday. I
> >> hope to have everything building and docs completed by the end of the
> >> weekend.
> >>
> >> The new formulae will not be hosted in OSGeo4Mac or Homebrew (at least
> not
> >> until there are stable releases), but in a specific tap for QGIS
> development
> >> and Travis CI support:
> >>
> >> https://github.com/qgis/homebrew-qgisdev
> >>
> >> So, look for changes there as things progress. Please contribute or post
> >> bug reports there for those dev formulae or docs, once they are
> available.
> >>
> >> Regards,
> >>
> >> Larry Shaffer
> >> Dakota Cartography
> >> Black Hills, South Dakota
> >>
> >>>
> >>> 2016-11-01 1:22 GMT+07:00 Matthias Kuhn <matthias at opengis.ch>:
> >>>>
> >>>> Hi Diane and welcome aboard,
> >>>>
> >>>> I also didn't manage to compile master on osx yet.
> >>>>
> >>>> Some more information can be found here also:
> >>>>
> >>>>
> >>>> https://github.com/OSGeo/homebrew-osgeo4mac/pull/146#
> issuecomment-254011621
> >>>>
> >>>> I think most of the dependencies should meanwhile be available on
> >>>> homebrew (but not sure).
> >>>>
> >>>> Regards
> >>>> Matthias
> >>>>
> >>>> On 10/31/2016 06:56 PM, David Marteau wrote:
> >>>> > Hi
> >>>> >
> >>>> > I will speak with my own experience using and compiling Qgis on Mac
> >>>> > (El capitan and Maverick):
> >>>> >
> >>>> > First I use Macport: MacPort use clang/libc++ by default (at least
> >>>> > with XCode 5.3 on Maverick, 7.3 on El capitan) so this should solve
> one of
> >>>> > your problems.
> >>>> > I have installed qt5 from MacPort without problems.
> >>>> >
> >>>> > The problems arise with some ports that do not fully support qt5
> >>>> > variants and you need to tweak some portfiles: qscintilla and
> py-qscintilla
> >>>> > are one of them and are required by Qgis.
> >>>> > If you are interested I can give you my diff files for portfiles.
> >>>> >
> >>>> > I had to build qwt directly from sources because tweaking Macport
> >>>> > portfiles was too painful, but I did not encounter any serious
> problems as
> >>>> > far as I can remember.
> >>>> >
> >>>> > No source code was needed to be patched, only compilation
> >>>> > configurations.
> >>>> >
> >>>> > Once you get all dependencies you need to set the cmake options
> >>>> > accordingly to the path of your installation:
> >>>> >
> >>>> > Here is my defines:
> >>>> >
> >>>> > »   »   -DCMAKE_INSTALL_PREFIX:PATH=/Applications \
> >>>> > »   »   -DWITH_SERVER=ON \
> >>>> > »   »   -DWITH_PYSPATIALITE=ON \
> >>>> > »   »
> >>>> > -DPYTHON_CUSTOM_FRAMEWORK:PATH=/opt/local/Library/
> Frameworks/Python.framework
> >>>> > \
> >>>> > »   »   -DEXPAT_INCLUDE_DIR:PATH=/opt/local/include \
> >>>> > »   »   -DEXPAT_LIBRARY:FILEPATH=/opt/local/lib/libexpat.dylib \
> >>>> > »   »   -DSQLITE3_INCLUDE_DIR:PATH=/opt/local/include \
> >>>> > »   »   -DSQLITE3_LIBRARY:FILEPATH=/opt/local/lib/libsqlite3.dylib
> \
> >>>> > »   »
> >>>> > -DQT_QMAKE_EXECUTABLE:FILEPATH=/opt/local/libexec/qt5/bin/qmake \
> >>>> > »   »
> >>>> > -DQWT_INCLUDE_DIR:PATH=/usr/local/qwt-6.1.3/lib/qwt.
> framework/Versions/6/Headers
> >>>> > \
> >>>> > »   »
> >>>> > -DQWT_LIBRARY:FILEPATH=/usr/local/qwt-6.1.3/lib/qwt.
> framework/Versions/6/qwt
> >>>> > \
> >>>> > »   »   -DQCA_INCLUDE_DIR:PATH=/opt/local/include/qca \
> >>>> > »   »   -DQCA_LIBRARY:FILEPATH=/opt/local/lib/libqca.dylib \
> >>>> > »   »   -DQSCINTILLA_INCLUDE_DIR:PATH=/opt/local/libexec/qt5/include
> \
> >>>> > »   »
> >>>> > -DQSCINTILLA_LIBRARY:FILEPATH=/opt/local/libexec/qt5/lib/
> libqscintilla2.dylib
> >>>> > \
> >>>> > »   »
> >>>> > -DQT_LRELEASE_EXECUTABLE:FILEPATH=/opt/local/libexec/qt5/bin/lrelease
> \
> >>>> >
> >>>> > I hope that full support for qt5 will be available from Macport
> soon,
> >>>> > but for now I have managed to compile Qgis from the master branch
> without
> >>>> > struggling too much.
> >>>> >
> >>>> > Best,
> >>>> > David
> >>>> >
> >>>> >> Le 31 oct. 2016 à 16:12, Diane Perez <lintawa at gmail.com> a écrit :
> >>>> >>
> >>>> >> Dear QGIS developers,
> >>>> >>
> >>>> >> First of all, thank you very much for the great job, I have been a
> >>>> >> very happy user for years !
> >>>> >>
> >>>> >> I would like to contribute now to the development, but I found
> myself
> >>>> >> stuck at the installation of dependencies.
> >>>> >>
> >>>> >> According to the instructions of the INSTALL file provided with the
> >>>> >> source code, mac users should use Qt 4 and compile and install a
> bunch of
> >>>> >> dependencies for which binaries are not available (mainly
> Spatialindex, SIP,
> >>>> >> QScintilla2, PyQt, Qwt and bison) before being able to compile
> QGIS. I
> >>>> >> followed the instructions and got stuck at compiling QGIS as the
> master now
> >>>> >> requires Qt 5.
> >>>> >>
> >>>> >> Now as I actually started by installing Qt 5 by mistake, I had the
> >>>> >> opportunity to see that it leads to a lot of problems to compile
> the
> >>>> >> dependencies. As far as I understand, Qt 5 requires C++11, which
> means one
> >>>> >> must use the new libc++ library instead of the old libstdc++ (at
> least on my
> >>>> >> configuration, with El Capitan and clang/llvm). Some modifications
> are such
> >>>> >> that mixing both is not possible, so everything must be compiled
> from start
> >>>> >> with C++11 and libc++. Unfortunately most of the dependencies I
> mention
> >>>> >> above do not compile without tweaking, and I stopped doing it when
> it
> >>>> >> started meaning not only modifying the Makefiles but the code
> itself...
> >>>> >>
> >>>> >> I guess some of you work on mac, and have a far better
> understanding
> >>>> >> of all this than me. So my question is : how did you install those
> >>>> >> dependencies to compile the last version of QGIS with Qt 5 ?
> >>>> >>
> >>>> >> Did you have to compile again all of them or only a subset using
> Qt 5
> >>>> >> and C++11 ? If so, how did you do it ? I got stuck at Qwt (6.1.3)
> which uses
> >>>> >> lots of functions deprecated in Qt 5.
> >>>> >>
> >>>> >> I hope someone can give me pointers, as I would really like to
> >>>> >> contribute to QGIS (and hopefully fix a few bugs bugging me) !
> >>>> >>
> >>>> >> Best regards,
> >>>> >> Diane
> >>>> >>
> >>>> >> _______________________________________________
> >>>> >> Qgis-developer mailing list
> >>>> >> Qgis-developer at lists.osgeo.org
> >>>> >> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> >>>> >> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-
> developer
> >>>> >
> >>>> > _______________________________________________
> >>>> > Qgis-developer mailing list
> >>>> > Qgis-developer at lists.osgeo.org
> >>>> > List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> >>>> > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> >>>> >
> >>>> _______________________________________________
> >>>> Qgis-developer mailing list
> >>>> Qgis-developer at lists.osgeo.org
> >>>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> >>>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>> Qgis-developer mailing list
> >>> Qgis-developer at lists.osgeo.org
> >>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> >>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> >>
> >>
> >> _______________________________________________
> >> Qgis-developer mailing list
> >> Qgis-developer at lists.osgeo.org
> >> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> >> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> >>
> >>
> >
> >
> > _______________________________________________
> > Qgis-developer mailing list
> > Qgis-developer at lists.osgeo.org
> > List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20161118/7bc82b96/attachment-0001.html>


More information about the Qgis-developer mailing list