Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.5k Posts
  • Is Qt support autosave API for sandbox application [OSX] ?

    Unsolved
    6
    0 Votes
    6 Posts
    508 Views
    N
    Sorry for pick up this theme again, but I just investigated Qt documentation and found that QSaveFile do that functionality. From the documentation: "QSaveFile is an I/O device for writing text and binary files, without losing existing data if the writing operation fails. While writing, the contents will be written to a temporary file, and if no error happened, commit() will move it to the final file. This ensures that no data at the final file is lost in case an error happens while writing, and no partially-written file is ever present at the final location. Always use QSaveFile when saving entire documents to disk." Hm... It will work on OSX (for sandbox application) or I miss something? UPDATE: QSaveFile - didn't work for sandbox application :-(
  • Stop QGraphicsProxyWidget from forwarding events to the owned widget

    Unsolved
    5
    0 Votes
    5 Posts
    680 Views
    I
    Thousands is a bit of an exageration, a few hundred was already a big number... on a second thought we agreed it wouldn't be a problem to limit the user to see something like 20-30 widget (of the most simple type) at the same time - while scene can still easily hold one/two hundred widgets. Anyway, if I understand it correctly, you suggest to call something like QWidget::render(myPixMap) on every widget I have and then keep them in sync with the "real" widget if anything happens. I'm gonna try and see if performance is an issue, especially during the switch to "edit mode". Regarding how the app works, imagine a static report with few interactive parts where the user can modify simple pieces of data (which can in turn modify other data displayed and so on, often creating a complex, but finite, chain of updates). A fundamental aspect is that the data displayed and how it is displayed should be completely customizable, since the type, the number of data and their relation/update rules are not known at compile time and have to "programmed" through a very simple interface by the user. Simple example: the user say all his data consists of a single integer. Then it goes to the "edit mode", add a proper widget(s) to display the int (let's say it has a choice between a QLCDNumber and a more complex widget made up of a line edit with a proper mask and a label with a description). It can add 10 widget of the same type displaying the same information and position them where he likes.
  • Mapping scene coordinates and Item coordinates

    Solved
    10
    0 Votes
    10 Posts
    2k Views
    N
    @mrjj Thank You ! :)
  • QListWidget Item Disappear setViewMode(IconMode) while resizing

    Solved
    4
    0 Votes
    4 Posts
    572 Views
    EmrecpE
    I solved issue! with updating PyQt5 5.14.1 to 5.15.1.
  • Can't give button a QIcon!

    Solved
    9
    0 Votes
    9 Posts
    1k Views
    Chris KawaC
    @nullbuil7 QIcon("..\\Save.ico") or QIcon("../Save.ico"). Either of those would work but don't do that. Relative paths are relative to current working directory, which can be different depending on how you start your app (via exe click, shortcut, command line etc.). If your path is relative to your exe location then retrieve a path of your exe and build an absolute path at runtime. For example, if your exe is in C:\MyApp\bin\MyApp.exe and your icon is in C:\MyApp\data\icon.ico you can get a path to it like this: QString path = qApp->applicationDirPath() + "/../data/icon.ico"; also, take a look at Qt Resources System. You can just embed your icon inside the data segent of your exe and use a resource path like this QIcon(":/icon.ico").
  • How to read windows registry value in Qt Installer framework?

    Solved
    3
    0 Votes
    3 Posts
    911 Views
    N
    @JonB thank you. "HKEY_CURRENT_USER\\Software\\TEMP\\hi" works.
  • QLinkedList undefined external symbol

    Unsolved
    2
    0 Votes
    2 Posts
    1k Views
    A
    Hi I encountered the same problem and found out that it issue comes from the Platform Toolset in your Project properties. When you go to the property pages Configuration Properties section -> General -> Platform Toolset -> Change it for Visual Studio 2017 (v141) Recompile the project and you should get your dll. Don't forget to create a ticket for this bug with Microsoft Visual Studio repository. The solution is explained here : https://github.com/commontk/CTK#build-instructions
  • Switch between application modes during runtime

    Solved
    8
    0 Votes
    8 Posts
    810 Views
    J
    Thanks again @J-Hilk, you've certainly led me down the correct path. I've more or less got this process working now. I ended up using an external controller class, which is passed QPointers from main.cpp, to allow the controller class to instantiate, destroy and reinstantiate the operating mode classes as required, using the main.cpp objects. As far as this thread is concerned, I believe a solution has been reached, and I'll mark the thread as such. I'm still having issues with the QPointer process however, for which I'll start another thread as its not closely aligned with the objective of this thread.
  • This topic is deleted!

    Unsolved
    3
    0 Votes
    3 Posts
    31 Views
  • Pass value to Dialog/set Values

    Solved qdialog pass value qlineedit
    7
    0 Votes
    7 Posts
    3k Views
    nicmoraisN
    Wow! Thank you @JonB, this solved my issue. One more solved topic to the forum. Have a nice a nice day!
  • QT Designer and making it stretch when user resizes the window (on run time)

    Solved
    1
    0 Votes
    1 Posts
    173 Views
    No one has replied
  • In which version of Qt 5.8+ QWinMigrate process events correctly in Dll project?

    Unsolved
    1
    0 Votes
    1 Posts
    108 Views
    No one has replied
  • Qtrpt :-1: error: Unknown module(s) in QT: script

    Unsolved
    3
    0 Votes
    3 Posts
    422 Views
    mrjjM
    Hi Does it use the old script module? [image: uCOAwa.png]
  • [PYTHON 3.8] How to transfer found pyqt code to pyside2? [BEGINNER]

    Unsolved
    2
    0 Votes
    2 Posts
    483 Views
    SGaistS
    Hi, In this case, you should let the mouseButtonPress do its job first and only then call selectAll on your QLineEdit.
  • [Solved]Select entirely row in QTableWidget

    Solved
    3
    0 Votes
    3 Posts
    209 Views
    S
    Many thanks, it works :)
  • 0 Votes
    2 Posts
    236 Views
    Pablo J. RoginaP
    @learnist please don't double post. Issue is being discuss there.
  • 0 Votes
    4 Posts
    1k Views
    T
    Calling the base class implementation did the trick. Thank you again! I didn't try the resizeToContents as some cells shouldn't be sized to their content in some context.
  • QPushButton click detection issue

    Solved
    4
    0 Votes
    4 Posts
    433 Views
    SGaistS
    Hi, You should also add the environment where your issue happens.
  • Qt 5.15.1 - ApplePersistenceIgnoreState: Existing state will not be touched. Why?

    Unsolved
    2
    0 Votes
    2 Posts
    408 Views
    SGaistS
    @bogong said in Qt 5.15.1 - ApplePersistenceIgnoreState: Existing state will not be touched. Why?: ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to (null) Hi, A quick search returns this.
  • Update qCombobox inside qtableWidget with sqlite data

    Unsolved
    4
    0 Votes
    4 Posts
    400 Views
    JonBJ
    @Isidro-Perla You must put your variable in place of the QTableWidget in QTableWidget::cellWidget(), so combo = qobject_cast<QComboBox*>yourTableWidget->cellWidget(row, column); I see you have ui->tW_Datos->setCellWidget (fila, 1, combo);, you to get it back: combo = qobject_cast<QComboBox*>ui->tW_Datos->cellWidget(fila, 1);