[Interest] How to prohibit moving of the QDialog on Linux
Igor Mironchik
igor.mironchik at gmail.com
Tue May 5 16:00:56 CEST 2015
Hi.
I found the solution. It's simple. Just needed to add widget to the
dialog that will eat mouse events.
I.e. invoke e->accept();
...
Thank you.
On 05.05.2015 15:06, Igor Mironchik wrote:
> Hi.
>
> In the following code sample:
>
> #include <QApplication>
> #include <QDialog>
>
>
> class Dialog
> : public QDialog
> {
> public:
> Dialog()
> : QDialog( 0, Qt::Dialog | Qt::FramelessWindowHint |
> Qt::WindowStaysOnTopHint )
> {
> resize( 300, 300 );
> }
> };
>
>
> int main( int argc, char ** argv )
> {
> QApplication app( argc, argv );
>
> Dialog dlg;
> dlg.show();
>
> return app.exec();
> }
>
> I receive blank rectangle as I expected, but when I click on it and
> move mouse cursor window moves with the cursor. How to prohibit it on
> Linux? Thank you.
>
>
More information about the Interest
mailing list