Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • having trouble reading from textstream

    Unsolved
    2
    0 Votes
    2 Posts
    206 Views
    JonBJ
    @kook said in having trouble reading from textstream: QString str = in.readAll(); ... while (in.readLineInto(&line)) If you have already done a readAll() from the stream, where do you expect a subsequent readLineInto() to start reading from? Either do your work on the str containing all the read data or don't do that and do the readLineInto(), not both. Or if you do want to use both as you have shown, it is not surprising you have to go datafile.seek(pos); to reposition the reader; but I would either do everything off the str or everything off the in.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Qt Installer Framework: How to delete components with an online installer?

    Unsolved
    1
    0 Votes
    1 Posts
    166 Views
    No one has replied
  • Proper use of QPrivateSignal

    Unsolved
    8
    1 Votes
    8 Posts
    6k Views
    jeremy_kJ
    @KroMignon said in Proper use of QPrivateSignal: @jeremy_k said in Proper use of QPrivateSignal: Did you try the code above? QTimer::timeout is a private signal, and yet still callable using a clang 13 C++. Sorry, now I understand what you are meaning... sad situation :( Or curious. I don't know if this is a failure with Qt, C++, or my understanding.
  • executable file is not created when project is started

    Unsolved
    4
    0 Votes
    4 Posts
    357 Views
    jsulmJ
    @KARMA said in executable file is not created when project is started: What should I do to turn this file into a ready-to-run .exe on windows? You need to build your project on Windows...
  • QObject: Cannot create children for a parent that is in a different thread

    Solved
    11
    0 Votes
    11 Posts
    1k Views
    J.HilkJ
    @SPlatten said in QObject: Cannot create children for a parent that is in a different thread: @J-Hilk , thank you, I will give that a go, although the UDP goes to all clients. I know, I usually have an ID - byte at the front of my UDP datagrams, that identifies it as a Datagram for all or for a specific recipient
  • Connecting to a Library In Linux

    Solved
    9
    0 Votes
    9 Posts
    1k Views
    C
    @WesLow If your program uses functions from libzmq. compiled. and linked cleanly then the linker options are OK (but possibly not perfect). If you built and installed libzmq as you describe then the result is installed under /usr/local/bin, lib etc. The "-L" part of your LIBS variable is wrong but is possibly not required because /usr/local/lib will often be searched by default. If the black screen is from your running program then that is a different problem.
  • Why does it show me the message, Potential leak of memory when opening a QDialog

    Solved
    4
    0 Votes
    4 Posts
    461 Views
    jsulmJ
    @lincoln Actually you could simply move these two lines QVBoxLayout *mainLayOut=new QVBoxLayout(&licenciDlg); QTextEdit *teLicencia=new QTextEdit(&licenciDlg); after if(!fileName.open(QFile::ReadOnly | QFile::Text)){...} then there is no need to delete anything. Create things when they are needed, not before.
  • Not Responding during install

    Unsolved
    4
    0 Votes
    4 Posts
    375 Views
    jsulmJ
    @Mitzury said in Not Responding during install: And i'm close Windows 10 (disable) defender. Yes, try this. I never had such issues on Windows 10, but who knows...
  • QGraphicsView, many non-scaling labels. Best approach

    Unsolved
    4
    0 Votes
    4 Posts
    358 Views
    JoeCFDJ
    @SandSnip3r Yes, Region of interest. You do not resize text items at all since font size does not change. You always keep these text items on the top of all items in QGraphicsView if they are visible. Simply move them in the view(their positions change) when ROI changes(zooming). Like they are floating on the view.
  • cannot open file 'shell32.lib'

    Unsolved shell32.lib
    10
    0 Votes
    10 Posts
    10k Views
    SGaistS
    @Nethzz said in cannot open file 'shell32.lib': @SGaist plz can you tell me how to find shell.32 lib automatically?? ":-1: error: LNK1104: cannot open file 'shell32.lib'" How are you linking to it ?
  • 0 Votes
    16 Posts
    3k Views
    mrjjM
    @Christian-Ehrlicher Hi Seems to call it from QPushButton::sizeHint() but I failed to find way to trigger it without altering text. I guess for full disclosure the source is needed and single step :9 I use wobog for it.
  • Cross compile with OpenCV (Raspberry Pi4)

    Unsolved
    6
    0 Votes
    6 Posts
    917 Views
    jsulmJ
    @Andrea_M It looks like the OpenCV libs are not passed to the linker. Do a complete rebuild: delete build folder, run qmake and build.
  • What should be in C:\Users\*name*\qt

    Unsolved
    4
    0 Votes
    4 Posts
    329 Views
    E
    Hi. Thanks both. I installed qt in d:\qt. It is looking explicitly for files in c:\users\name\qt. which is currently empty. I can try to run from the IDE or launch the exe with the same result. I understand programs dont need .cpp to run, its for compiling. However, it wants it. Probably because im running in debug and its trying to link a pdb. I have no definitive proof that CCleaner did it but there is a trend. Works been very busy so have done what mrjj said, but i shall try now!
  • Using Arguments with SingleShotTimer

    Solved
    3
    0 Votes
    3 Posts
    372 Views
    L
    Great thanks!. Let me give it a try :)
  • Limitation and scope of Qt form image handling application.

    Unsolved
    2
    0 Votes
    2 Posts
    151 Views
    mrjjM
    Hi Qt should be able to scale SVG. or any vector format. Only if you use some libs for it. Qt dont support many vector formats besides SVG will I be able to run a Qt application at the boot of a Linux system startup, Even the desktop is not required to be loaded. Yes but you will need an Xserver or similar. and do note that open Qt has less options than pay for Qt in this area. https://doc.qt.io/QtForDeviceCreation-5.12/qtb2-index.html but yes its possible if you know your way around linux. I dont know what use case really is but make sure its not covered from things like https://imagemagick.org/index.php but its mostly raster based.
  • QT Online installer is slow

    Unsolved
    3
    0 Votes
    3 Posts
    284 Views
    J
    I tried Even in picture above, I took a screenshot from 5 best repositories
  • Calculate eulerRotation for Node

    Solved
    5
    0 Votes
    5 Posts
    674 Views
    md2012M
    Looks like latitude and longitudes were enough to calculate the right angle for the marker to point to the center of the sphere. Here is the final result: Node{ position: calculatedPosition() eulerRotation{ x: 180-latitude y: longitude z: 0 } //Properties property int radiusEarth: 1180 property real latitude: 0 property real longitude: 0 Node { Image { anchors.centerIn: parent source: "qrc:/3DGlobe/textures/Hexagon_LightGreen.png" } } //Functions function calculatedPosition(){ var latitude_rad = latitude * Math.PI / 180; var longitude_rad = longitude * Math.PI / 180; var zPos = radiusEarth * Math.cos(latitude_rad) * Math.cos(longitude_rad); var xPos = -radiusEarth * Math.cos(latitude_rad) * Math.sin(longitude_rad); var yPos = radiusEarth * Math.sin(latitude_rad); return Qt.vector3d(-xPos-10, yPos+10, zPos+10) } } My pointer is 2d so this could need a 180 degree rotation with a 3d pin.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    6 Views
    No one has replied
  • QThread cleaning up when application terminates

    Solved
    5
    0 Votes
    5 Posts
    218 Views
    SPlattenS
    @jsulm Thank you.