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. Best way to do private browsing mode

Best way to do private browsing mode

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.2k Views 1 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.
  • N Offline
    N Offline
    nicky j
    wrote on last edited by
    #1

    Hello everyone,

    I have been trying to figure out a way to give my browser a 'Privacy Mode' with little success. I was thinking about having a slot 'enablePrivacy', when called this slot would set the browser to 'Privacy Mode'. I have a lot of other slots that handle stuff like page loading, application styles, history, etc. I need these slots to be able to check if 'Privacy Mode' has been enabled or not. I am thinking about having enablePrivacy() set the value of a global QString to 'enabled' and then have all the other slots check via if() statements. Is this a good way to do it? is it a wise choice to use a global variable? If not how can I set something to 'enabled' and have all other slots check that?

    Thanks!

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      one property value as you explained. Otherway is inherit the class and add your own variable. I prefer property way as you explained.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      0
      • N Offline
        N Offline
        nicky j
        wrote on last edited by
        #3

        Okay how can I declare a global variable and access it in functions of other classes?

        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