Skip to content
Qt 6.11 is out! See what's new in the release blog
  • 145k Topics
    725k Posts
    JonBJ
    @Jim-G I don't know where you are really at now, because I do not get the same results as you do. FWIW I am using Ubuntu 26.04, Qt 6.10.2, PySide 6.11.1. But I am not expecting any difference for you from different versions or platform (e.g. Windows if that is what you are using). If I copy and paste your original code I get a visual window. It is a main window. It opens "small", but I can drag-resize it and it looks similar to what you showed in both screenshots. But note this whole code is quite wrong: you end up with two QMainWindows, one is your MainWindow and the other is a QMainWindow from your .ui file which has been set as the central widget via self.setCentralWidget(self.ui). You do not want a QMainWindow as the type of the central widget of a QMainWindow! If I replace just MainWindow's def __init(self) per your last post I get an empty MainWindow --- your title but no content. And the same whether loader.load(ui_file, self) has self as parameter or not. No "hang", no "no window displayed". So if you really want to use, or have people investigate, you attempted use of QUiLoader(), I suggest you paste a new complete but minimal example of your code as it is, as I am guessing it is not just as you show/I have copied. (I still don't think the new code can be right: self is your MainWindow, which is a QMainWindow, and when your __init() goes self.setLayout(layout) that sets the whole layout of a QMainWindow which you would never want to do. The point of a QMainWindow is that it already has its own layout with various widgets to produce menus and status bars. It has one area in the "middle" which is the "central widget" and you should only be setting that and its layout and content.) Personally I do not think you will gain much by persisting with QUiLoader()/loader.load(ui_file) since I don't think that is the best way to use Qt/Designer back-end code. As I have said I would abandon that approach and use the class-generation one instead. I have never used QUiLoader() so don't have much experience, but will look again at your code (if made to work) if you wish to continue with that.
  • Jobs, project showcases, announcements - anything that isn't directly development
    4k 23k
    4k Topics
    23k Posts
    Mike Trahearn 0M
    Check out my LinkedIn Profile for: Project history and work experience Informative posts and articles about Qt and QML Ways that I could help you and your team!
  • Everything related to designing and design tools

    132 397
    132 Topics
    397 Posts
    SGaistS
    Hi, I think the wiki has the starting point Hope it helps
  • Everything related to the Software Quality Tools

    96 266
    96 Topics
    266 Posts
    C
    @Emma-2000 said in Squish for Java, select an item in a list box: I’ve run into a similar issue with long JavaFX lists where the target item isn’t initially visible. Using the component’s available items/model instead of relying only on scrolling seems much more reliable, especially when the test input changes dynamically. Agreed on using the model and toolkit API to access or even scroll a particular object into view. (Squish for Java tries to automatically scroll an object into view upon mouseClick(). And one can pass Button.NoButton (https://doc.qt.io/squish/java-convenience-api.html#java-convenience-function-parameters) to mouseClick() to trigger the scrolling attempt without performing a mouse click.) The approach with obj.items.length, obj.items.get(i) and assigning obj.value looks particularly useful for making the test independent of the item’s position in the list. obj.items.get(i) requires specifying the index of the item, which I intuitively understand to be the "position in the list". Perhaps by "position" you meant the location on the screen? If so, yes, hardcoded positions are better to be avoided. (Squish is using screen positions for sending events, etc. - but it determines/calculates these screen locations at runtime.) Ah, after further consideration, you probably meant iterating over the items until the desired one is found. Alright.
  • Everything related to learning Qt.

    401 2k
    401 Topics
    2k Posts
    Nils SjobergN
    Nice..now he knew whether to perform certification
  • 2k Topics
    13k Posts
    L
    Qt for HarmonyOS development with 6.12.0 https://wiki.qt.io/Qt_for_HarmonyOS_development_with_6.12.0 https://lists.qt-project.org/pipermail/development/2026-August/047432.html #Qt #HarmonyOS #OpenHarmony #Huawei
  • 4k Topics
    18k Posts
    H
    [image: acc63b82-54bc-40d4-a5d1-005d45c1cd23.png]
  • This is where all the posts related to the Qt web services go. Including severe sillyness.
    1k 10k
    1k Topics
    10k Posts
    SGaistS
    Ok, akismet triggering is not always clear. Beside this issue, what was your question about ?