Results 1 to 4 of 4

Thread: Notepad++ like dialog

  1. #1
    Join Date
    Mar 2010
    Posts
    77
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Notepad++ like dialog

    Hi everyone,

    I want to create a QDialog not modal but always shows on top of other widgets and when I select below full screen widget or mainwindow my dialog shouldn't hide just get some transparency. exactly like find in notepad++.

    How can i do that?

  2. #2
    Join Date
    Aug 2015
    Location
    Gdansk, Poland
    Posts
    21
    Thanks
    3
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Notepad++ like dialog

    Hi Danics,
    Your problem nicely documented in Qt Creator Help Page, in section Qt Namespace/Widget Attribute
    Better explanation there, just press Ctrl+F
    another one maybe about evenFilter or signals&slots
    Good luck ^^

  3. #3
    Join Date
    Mar 2010
    Posts
    77
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Notepad++ like dialog

    Can you give more hint and say exactly witch attributes must be set for dialog?

    thanks in advance.

  4. #4
    Join Date
    Aug 2015
    Location
    Gdansk, Poland
    Posts
    21
    Thanks
    3
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Notepad++ like dialog

    Non modal -> create your dialog on the heap and show(); destroy on close
    Mouse event -> QObject::connect(qApp,SIGNAL(focusChanged(QWidget* ,QWidget*),yourQDialog,SLOT(changeOpacityFunc())
    Qt Code:
    1. void changeOpacityFunc()
    2. if (!isActiveWindow)
    3. setWindowOpacity(qreal e.g 0.5);
    4. else
    5. setWindowOpacity(qreal e.g 1);
    To copy to clipboard, switch view to plain text mode 
    Read help page I told before for more customization, happy coding ^^

Similar Threads

  1. Tabbed Notepad
    By "BumbleBee" in forum Newbie
    Replies: 3
    Last Post: 13th October 2011, 20:46
  2. Strage problem Writing to a Notepad file
    By nagabathula in forum Newbie
    Replies: 5
    Last Post: 23rd June 2011, 07:32
  3. How to access objects of parent Dialog from Child Dialog .
    By ranjit.kadam in forum Qt Programming
    Replies: 4
    Last Post: 18th April 2011, 06:39
  4. Enabling Virtual Keyboard with Notepad Appllication?
    By augusbas in forum Qt for Embedded and Mobile
    Replies: 11
    Last Post: 7th August 2009, 07:18
  5. NotePad and WordPad (why)
    By baray98 in forum Qt Programming
    Replies: 2
    Last Post: 29th July 2008, 22:48

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.