Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • QTextBrowser::setSource() with non existent Url

    Unsolved
    3
    0 Votes
    3 Posts
    478 Views
    JonBJ
    @J-Hilk I think QTextBrowser::source() looks in a variety of places (e.g. QTextBrowser::searchPaths()), beyond where QFile looks. I wanted to know if setSource() failed, regardless of local/network location, URL format, permissions, bad file type/HTML can't be loaded, whatever which would make source not load successfully.... I guess I will have to treat special case of local file and just test for existence where I expect it to be, it will have to do me for now. Unless anyone can suggest better....
  • Q_PROPERTY parse err for MEMBER QVariantList but not for other types

    Solved
    5
    0 Votes
    5 Posts
    969 Views
    sierdzioS
    @Szymon-M-Sabat said in Q_PROPERTY parse err for MEMBER QVariantList but not for other types: Ok, found it. NOTIFY, not NOFITY. Also, found it thanks to this: https://bugreports.qt.io/browse/QTBUG-36367 Oh my goodness, of course, a typo. Well, thanks for sharing the solution :-) I'll be extra careful next time I see this error message.
  • QLabel slot to call while ui form show

    Unsolved
    2
    0 Votes
    2 Posts
    212 Views
    JonBJ
    @lalit_stpl If you want to call a function from python to open a camera on ui form initialization then call it from form initializer/constructor. What is the connection to your topic's title QLabel slot to call while ui form show What is the QLabel mention about? We are not mind-readers.... :)
  • Some Qt programs bypass xkb.

    Unsolved
    1
    0 Votes
    1 Posts
    156 Views
    No one has replied
  • Where are the Qt 5.6 offline installers?

    Solved
    2
    0 Votes
    2 Posts
    769 Views
    Chris KawaC
    The archive was split into archive and new archive. 5.6 is in the new one. I don't know what's the rule for which version goes where.
  • Versioning for Qt Creator plugins in alpha/beta stage

    Solved
    5
    0 Votes
    5 Posts
    391 Views
    J
    This is the solution we plan to go with. The semantic version will be accessible somewhere in the plugin (“About” button, text element or similar) for development versions (alpha, beta, release candidate, hotfix). This allows us to have a lighter mapping between the semantic version of the build and meta version entered for the plugin. The version entered in the meta data will set x.y.z based on the semantic version (ignoring the pre-release label). When a development version is built, we append _n to the meta version (where n is an increasing number for each build). In short For development builds: x.y.z_n = <sem.major>.<sem.minor>.<sem.patch>_<build number> For stable builds: x.y.z = <sem.major>.<sem.minor>.<sem.patch> Edit We have introduced the usage of GitVersion to determine the version number for our builds. It has a nice feature of delivering a "weighted" number and we use this instead of using a increasing build for development builds (the _n part of the version).
  • how to build debug using commandline on macos

    Solved
    2
    0 Votes
    2 Posts
    148 Views
    O
    I got it!!!!! ${qmakePath} "CONFIG+=debug" ${proFilePath}
  • QTextEdit: adding normal text after html

    Unsolved
    5
    0 Votes
    5 Posts
    694 Views
    JonBJ
    @enne9 You do not explain what it is you see, or how you say the HTML ends up which you should show us, after you enter some characters. I don't know what "new spans are added instead of inserting the actual content I enter using the keyboard" means. If I try your code (Linux Qt 5.12.2), with color being red, what I see is: a red background on one space, with the cursor immediately to the right of that space. When I type characters they appear, but with the red background. Doubtless because it does not know whether your cursor "position" is after the &nbsp; but still before the </span> versus whether it is after the </span> . If I append a <br /> to your HTML, "...>&nbsp;</span><br \>", the cursor starts at the line below and characters now typed do not have the red background. You may have to explain exactly what happens to you and what you want/expect.
  • Qt/C++ The influence of the mainwidon button, to the buttons in the second window.

    Unsolved
    4
    0 Votes
    4 Posts
    279 Views
    B
    Thanks homies!! I will try this in home. Thanks for the fast response :)
  • QCamera with UVC Y16 camera

    Unsolved
    7
    0 Votes
    7 Posts
    1k Views
    J
    @SGaist Ok good to know, thanks.
  • SOLVED: Remove widgets from Layout

    12
    0 Votes
    12 Posts
    62k Views
    ma_veasnaM
    @SGaist thank you I really like your answer which helped me . it's short but pretty useful.
  • After building Qt5 from source, how do I run all its tests?

    Unsolved
    5
    0 Votes
    5 Posts
    327 Views
    Christian EhrlicherC
    @Phlip said in After building Qt5 from source, how do I run all its tests?: to see if they pass..? If not the CI would already have catch it would guess. You have to run them manually.
  • QTableWidget: how to show vertical header and set its size policy

    Unsolved
    14
    0 Votes
    14 Posts
    9k Views
    Christian EhrlicherC
    @Black-Imp said in QTableWidget: how to show vertical header and set its size policy: Sorry there was a huge string with style sheet in main and a row sets the style of all QHeaderView. That caused my problem. That's the reason why I wanted you to create a minimal example. Please mark the topic as solved then.
  • Avoiding background image of Main window in child widgets

    Solved
    10
    0 Votes
    10 Posts
    2k Views
    VineelaV
    Well thank you all, I figured it out that is if i give border-image to main window i should give border-image:transparent to all child widgets . :)
  • How to Get QProcess Text ?

    Unsolved
    2
    0 Votes
    2 Posts
    193 Views
    G
    Try class QTextCodec, the example code: QByteArray encodedString = "..."; QTextCodec *codec = QTextCodec::codecForName("KOI8-R"); QString string = codec->toUnicode(encodedString); p.s. KOI8-R is for Russian.
  • Difficulties connecting signals with slots (static members)

    Solved signals slots static lua
    9
    0 Votes
    9 Posts
    3k Views
    Pl45m4P
    @SnuggleKat said in Difficulties connecting signals with slots (static members): Just didn't know signals mustn't be defined... If you mean "implemented" by "defined", then I wrote this in my first reply :) Yes, you dont implement signals. You just set the signal signature in your header file. After that, you can emit your signal to notify connected classes (-> slots)
  • Implementing SVG Editor with Qt > 5.x

    Unsolved
    8
    0 Votes
    8 Posts
    3k Views
    W
    @Parvathy2020 said in Implementing SVG Editor with Qt > 5.x: @mrjj Can we confirm that editing SVG file with Qt is not a good option ? Editing an SVG "with Qt" just isn't an option. Qt is a general purpose framework, and being a graphics editor is too specific to be useful to have as part of a general purpose tool set. By all means, feel free to use Qt for XML parsing, and for the GUI, etc. It'll work fine as some parts of a graphics editor. But you'll need to write the actual graphics editor parts.
  • Moving undocked dockable windows

    Unsolved
    2
    0 Votes
    2 Posts
    238 Views
    SGaistS
    Hi and welcome to devnet, What version of Qt are you using ? On what OS ? How did you install it ?
  • Accessing MainWindow object from another class

    Unsolved signals & slots widget
    15
    0 Votes
    15 Posts
    10k Views
    JonBJ
    @TUStudi I do believe this is the neater way to go. Your MainWindow and your TestClass are now quite independent of each other. If you had done "call a slot from MainWindow directly" TestClass would not be (re-)usable without MainWindow.
  • QInputDialog get double with unlimited number of decimal

    Solved
    4
    0 Votes
    4 Posts
    627 Views
    Christian EhrlicherC
    https://doc.qt.io/qt-5/qinputdialog.html#doubleDecimals-prop