Skip to content

Commit

Permalink
Replace QtDesktop widget in preparation for PySide6 (#1908)
Browse files Browse the repository at this point in the history
* Replace to-be-depreciated QDesktopWidget

* Remove unused imports and sort remaining imports
  • Loading branch information
roomrys authored Aug 16, 2024
1 parent 260fb85 commit 8a8ed57
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions sleap/gui/learning/dialog.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
"""
Dialogs for running training and/or inference in GUI.
"""
import cattr
import os
import json
import shutil
import atexit
import tempfile
from pathlib import Path
from typing import Dict, List, Optional, Text, cast

import cattr
from qtpy import QtCore, QtGui, QtWidgets

import sleap
from sleap import Labels, Video
from sleap.gui.dialogs.filedialog import FileDialog
from sleap.gui.dialogs.formbuilder import YamlFormWidget
from sleap.gui.learning import runners, scopedkeydict, configs, datagen, receptivefield

from typing import Dict, List, Text, Optional, cast

from qtpy import QtWidgets, QtCore
import json
from sleap.gui.learning import configs, datagen, receptivefield, runners, scopedkeydict

# List of fields which should show list of skeleton nodes
NODE_LIST_FIELDS = [
Expand Down Expand Up @@ -171,7 +168,7 @@ def __init__(

def adjust_initial_size(self):
# Get screen size
screen = QtWidgets.QDesktopWidget().screenGeometry()
screen = QtGui.QGuiApplication.primaryScreen().availableGeometry()

max_width = 1860
max_height = 1150
Expand Down

0 comments on commit 8a8ed57

Please sign in to comment.