Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to make the "CLOSE" button invisible
Forum Updated to NodeBB v4.3 + New Features

How to make the "CLOSE" button invisible

Scheduled Pinned Locked Moved Solved General and Desktop
23 Posts 4 Posters 3.5k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Alexandre CameloA Alexandre Camelo

    @mrjj Thank you one more time!

    I won't try to do that today (that's a lot).

    Tomorrow, I'll do everything calmly and give you feedback.

    You helped me MUCH today.

    Your tips have moved me, A LOT, in my QT learning.

    Big hug!

    mrjjM Offline
    mrjjM Offline
    mrjj
    Lifetime Qt Champion
    wrote on last edited by
    #21

    @Alexandre-Camelo
    Hi
    It looks a lot but i promise when you have done it a few times its not that crazy.
    Its good plan. Just ask if i missed some step or its bugging you.

    Do note we subclassed QLineEdit here.
    To catch events one can also use an eventfilter but subclassing is very useful in
    Qt as you can make own custom widgets that way. So i choose to show that way.

    https://doc.qt.io/qt-5/eventsandfilters.html

    Alexandre CameloA 2 Replies Last reply
    2
    • mrjjM mrjj

      @Alexandre-Camelo
      Hi
      It looks a lot but i promise when you have done it a few times its not that crazy.
      Its good plan. Just ask if i missed some step or its bugging you.

      Do note we subclassed QLineEdit here.
      To catch events one can also use an eventfilter but subclassing is very useful in
      Qt as you can make own custom widgets that way. So i choose to show that way.

      https://doc.qt.io/qt-5/eventsandfilters.html

      Alexandre CameloA Offline
      Alexandre CameloA Offline
      Alexandre Camelo
      wrote on last edited by Alexandre Camelo
      #22

      @mrjj said in How to make the "CLOSE" button invisible:

      @Alexandre-Camelo
      Hi
      It looks a lot but i promise when you have done it a few times its not that crazy.
      Its good plan. Just ask if i missed some step or its bugging you.

      Ok mrjj.

      It worked!

      One more great tip!

      I have some questions:

      1. Since the event is located in another file, I need to create a procedure inside the file where the line edit is located, so that I can, for example, throw focus on another line edit of that form, right?

      2. In this case, I associated the event with a previously existing line edit on the form. So if I need to create focus events for other line edits, do I need to create classes for each of them?

      3. What is the "QFocusEvent * event" pointer for? As I did not use it, the system issues a warning that it is not being used.

      4. Please give me an example of how to use the pointer "QFocusEvent * event"

      5. I created 2 test events, but I want to delete them so that QT doesn't issue warnings. How do I do that? Just delete the .cpp and .h files I created and rebuild?

      1 Reply Last reply
      0
      • mrjjM mrjj

        @Alexandre-Camelo
        Hi
        It looks a lot but i promise when you have done it a few times its not that crazy.
        Its good plan. Just ask if i missed some step or its bugging you.

        Do note we subclassed QLineEdit here.
        To catch events one can also use an eventfilter but subclassing is very useful in
        Qt as you can make own custom widgets that way. So i choose to show that way.

        https://doc.qt.io/qt-5/eventsandfilters.html

        Alexandre CameloA Offline
        Alexandre CameloA Offline
        Alexandre Camelo
        wrote on last edited by
        #23

        @mrjj said in How to make the "CLOSE" button invisible:

        To catch events one can also use an eventfilter but subclassing is very useful in
        Qt as you can make own custom widgets that way. So i choose to show that way.

        https://doc.qt.io/qt-5/eventsandfilters.html

        About eventfilter, I read the documentation, tried to do it, but couldn't.

        I think it's best to open a new topic about this, okay?

        I will quote you there and await your guidance.

        Thanks again.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved