Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. Since Call PySide.QtCore.QSettings.endGroup() to reset the current group to what it was before the corresponding PySide.QtCore.QSettings.beginGroup()
Forum Updated to NodeBB v4.3 + New Features

Since Call PySide.QtCore.QSettings.endGroup() to reset the current group to what it was before the corresponding PySide.QtCore.QSettings.beginGroup()

Scheduled Pinned Locked Moved Language Bindings
2 Posts 2 Posters 1.3k 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.
  • R Offline
    R Offline
    redstoneleo
    wrote on last edited by
    #1

    Since Call PySide.QtCore.QSettings.endGroup() to reset the current group to what it was before the corresponding PySide.QtCore.QSettings.beginGroup() call.
    So the following code does nothing ,right ? Perhaps I made some understanding mistake?(please clear it to me )
    @ def readSettings(self):
    self.settings = QSettings("Moose Soft", "Clipper")
    self.settings.beginGroup("MainWindow")
    self.resize(settings.value("size", QSize(400, 400)).toSize())
    self.move(settings.value("pos", QPoint(200, 200)).toPoint())
    self.settings.endGroup()
    @

    1 Reply Last reply
    0
    • I Offline
      I Offline
      INeedMySpace
      wrote on last edited by
      #2

      Check the code that write your settings. Settings are "tree" like structure. Group is a node, settings are leaves. If you execute .beginGroup() - you are inside "MainWindow", when you execute .endGroup() you leave this node and are on the level before "MainWindow" and can read settings on this level or open groups there.
      Your code reads 2 settings from "MainWindow" group which should be on main level. If you change to .ini file settings your ini file should look like
      @[MainWindow]
      size=nnn
      pos=mmm@

      You have been involved in illegal use of magic.

      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