Re: [Interest] Fail to compile qt4 on Ubuntu 20.04.

2020-05-26 Thread Frederik Christiani via Interest

On 26-05-2020 05:58, Hongyi Zhao wrote:

Lisandro Damián Nicanor Pérez Meyer 
于2020年5月25日周一 下午11:50写道:


Or grab the packaging from Ubuntu and compile it from there, it has
all the quirks resolved.


The files exist in Ubuntu repo have been divided into many parts, see here:

https://mirrors.tuna.tsinghua.edu.cn/ubuntu/pool/universe/q/

Which one is corresponding to the following one discussed in this thread:

https://download.qt.io/archive/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz


I think he is referring to the source package:

https://packages.ubuntu.com/source/eoan/libs/qt4-x11

--
Frederik Christiani
Viking Software
https://www.vikingsoftware.com/
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] how to debug qt sources on mac

2019-06-25 Thread Frederik Christiani via Interest

On 25-06-2019 05:06, David M. Cotter wrote:

tried to ask this on the forums but it got stalled.  see here for question and 
conversation:
https://forum.qt.io/topic/103639/how-to-debug-qt-sources-on-mac

anyone have any ideas?  what am i doing wrong?


Perhaps you forgot to tick the box that says "Use debug version of 
frameworks" in the Run Settings in Qt Creator.


You can also set the environment variable DYLD_IMAGE_SUFFIX=_debug which 
is probably what ticking the box does.


Kind regards,
Frederik

--
Frederik Christiani
Viking Software
https://www.vikingsoftware.com/
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Capture keyPressEvent on QMenuBar/QMenu?

2018-10-11 Thread Frederik Christiani via Interest

On 11-10-2018 02:02, Tony Rietwyk wrote:

Hi Israel,

Try installEventFilter on the menu to see the KeyPress events before 
they are handled by the menu.


In the eventFilter you'll want to look at the events of type
QEvent::ShortcutOverride. Remember to accept() the event if you don't 
want the shortcut action triggered.



Kind regards,
Frederik

--
Frederik Christiani
Viking Software
https://www.vikingsoftware.com/
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


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

2018-06-13 Thread Frederik Christiani via Interest

Hi,

On 13-06-2018 09:26, Nicolas Krieger wrote:
I would like to have a border in my widget, just like a QFrame. But a 
QFrame which border is over and not beside. I want to hide and show the 
border, but without layout re-sizing effects.


If I understand your problem correctly, you should be able to use a 
QGraphicsEffect like this:


#include 
#include 

class InsideBorderGraphicsEffect : public QGraphicsEffect
{
  Q_OBJECT
public:
  InsideBorderGraphicsEffect(QObject* parent = nullptr)
: QGraphicsEffect(parent)
  {
  }

protected:
  void draw(QPainter* painter) override
  {
QPoint offset;
const QPixmap pixmap = sourcePixmap(Qt::LogicalCoordinates,
);
painter->drawPixmap(offset, pixmap);
painter->setPen(QPen(Qt::magenta, 10));
painter->drawRect(boundingRect());
  }
};


Now it is just a matter of setting the effect on your widget with

  setGraphicsEffect(new InsideBorderGraphicsEffect);

and clear it again with

  setGraphicsEffect(nullptr);

--
Frederik Christiani
Viking Software
https://www.vikingsoftware.com/
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest