Results 1 to 4 of 4

Thread: How to create splash text

  1. #1
    Join Date
    Oct 2019
    Posts
    4
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default How to create splash text

    Hello,

    Is it possible to create dynamic splash text instead of a splash screen?

    I have a program (with its own main window) that every so often needs to display some dynamic text on the screen not just over the main window, but someplace on the screen. I don't want a background or any visible menus or borders, just the text. It seems like a splash screen might be the best approach, but please enlighten me!

    Thank you

    Working in PyQt5 and PySide2

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: How to create splash text

    The splash screen will be displayed in the center of the screen, and since it is borderless it can't be moved. You can use an ordinary QWidget-based class instead - just don't give it a parent QWidget when you create it, and it will be treated as a top-level widget like your QMainWindow. You can set window flags to remove the borders (if your OS / window manager allow that), but if you do and you want it to be moveable, you will have to implement code to handle mouse events on the widget to do that.

    Here is a stackoverflow post that might help.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Oct 2019
    Posts
    4
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to create splash text

    Many thanks, I will use a QWidget. I discovered a little program that shows how the different flags affect the window.

    How can I make the window transparent except for the text? Have you seen examples of this?

  4. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: How to create splash text

    There is a section in the QWidget class documentation that discusses transparency and translucency. You can probably also Google for examples.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Replies: 0
    Last Post: 22nd May 2018, 03:20
  2. Replies: 7
    Last Post: 5th February 2014, 12:20
  3. Replies: 2
    Last Post: 29th May 2013, 21:08
  4. How to create a text along with curve using QPainterPath
    By achayaan in forum Qt Programming
    Replies: 7
    Last Post: 12th June 2012, 07:20
  5. Create gradient and shadow on text?
    By Kevin Hoang in forum Qt Programming
    Replies: 1
    Last Post: 21st March 2010, 09:41

Tags for this Thread

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.