Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • How to correctly set/get environment variables

    Solved
    3
    0 Votes
    3 Posts
    15k Views
    R
    @sierdzio Thanks for your help. I think I'll use QDbus to do my job.
  • Motivation for multithreading in my App

    Unsolved
    20
    0 Votes
    20 Posts
    2k Views
    M
    @Absurd void message(QString msgType, QVariantMap data); QVariantMap not QVariant. QVarantMap is a map with QStrings for keys, so like say you emit a signal that is declared like above, it may look something like this. QVariantMap params; int param1 = 2; double param2 = 2.2; params.insert("param1",param1); params.insert("param2",param2); emit message("runSomeSpecificMethod",params); Then the receiving slot may look something like this void getMessage(QString messageType, QVariantMap data) { if (messageType.compare("runSomeSpecificMethod",Qt::CaseInsensitive) == 0){ SomeSpecificMethod(data.value("param1").toInt(),data.value("param2").toDouble()); } }
  • Andriod

    Unsolved
    2
    0 Votes
    2 Posts
    292 Views
    sierdzioS
    You need to use Android Intents for that. Use JNI to create the intent, or perhaps you could use startActivity for that.
  • Texteditor widget for resizing an Image with the mouse

    11
    0 Votes
    11 Posts
    4k Views
    S
    @Yunus Hello Yunus, thanks for your reply. My project is to implement a text editor like Word. Every things work fine except resizing an image with the mouse (like Word 2016) How can i detect the image in a QTextEdit, how to select it and then resize it. that's what i'm looking for..
  • How to define static members in a static function in .cpp file?

    Solved
    16
    0 Votes
    16 Posts
    3k Views
    T
    @jsulm said in How to define static members in a static function in .cpp file?: // This has to be OUTSIDE of any method/constructor Worked. bro Thank you
  • Tab key

    Unsolved
    2
    0 Votes
    2 Posts
    313 Views
    jsulmJ
    @yogesh1504 Are you using Qt Designer? You can specify tab order there.
  • webenginewidgets on .pro of library produce error

    Unsolved qwebengine
    10
    0 Votes
    10 Posts
    2k Views
    jsulmJ
    @LovelyGrace said in webenginewidgets on .pro of library produce error: but when I am trying to build the whole project from sub dir project including the library and the console, it produce the error You need to add Qt += webenginewidgets to your console project as well.
  • 0 Votes
    2 Posts
    269 Views
    sierdzioS
    Do you use beginInsertRows() and endInsertRows() in your row adding method?
  • 0 Votes
    6 Posts
    3k Views
    Christian EhrlicherC
    I'm sorry but I don't think will compile. Please provide a minimal, compilable example which shows your problem. E.g int main (int argc, char **argv) { QApplication app(argc, argv); QTreeWidget treeWidget; QTreeWidgetItem *cities = new QTreeWidgetItem(&treeWidget); cities->setText(0, "Cities"); treeWidget.show(); return app.exec(); } See http://doc.qt.io/qt-5/qtreewidgetitem.html#details
  • Have problem with Spanish Keyboard

    Unsolved
    2
    0 Votes
    2 Posts
    236 Views
    YunusY
    @xsw7910 Hi I never met a problem like this before. This seems to be about options I think so. This link may be helpful for you. https://forum.qt.io/topic/55335/solved-qt-creator-problems-with-hungarian-keyboard-in-win8-1/3
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    27 Views
    No one has replied
  • PySide2 (Qt with Python) doesn't detect compositing (X11 and Compton) - No transparency

    Unsolved
    2
    0 Votes
    2 Posts
    362 Views
    SGaistS
    Hi and welcome to devnet, Did you also try that with PyQt5 ?
  • Subdirs project variable

    Solved
    2
    0 Votes
    2 Posts
    242 Views
    SGaistS
    Hi, IIRC, you can put a file name .qmake.conf in the folder containing your SUBDIRS template and its content will be parsed when building all the project underneath. This file is search in the current project folder as well as its parent folder.
  • Cannot create a AVD for ABI Armeabi-v7a/Arm64-v8a. Install an image for it

    Unsolved
    13
    0 Votes
    13 Posts
    13k Views
    tomyT
    I even restarted the OS, but no change in result!
  • Get Windows 10 Accent Colour

    Solved
    9
    0 Votes
    9 Posts
    2k Views
    Chris KawaC
    I'm glad I could help but this line crashes the app This line initializes COM. It should definitely not crash your app and it is needed for winrt stuff to even work. but taking it out removes the crash and everything still works as expected That's like saying taking out main() fixes an app. It's suspicious to say the least. I'd suggest to look into it because now you basically don't know why your app is working. Where did you put that line? Are you initializing COM in some other way?
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Start exe from resources

    Unsolved
    3
    0 Votes
    3 Posts
    487 Views
    Chris KawaC
    You can't run executables from resources. They are compiled as a string in the data section of your application's executable. It would be incredibly dangerous and all modern operating systems prevent this. See Executable space protection for more info. The only option you have is to write it to a file first and run that. Note however that this behavior is incredibly fishy and no sane antivirus on the planet will like that.
  • Active QGraphicsScene on application startup

    Solved
    3
    0 Votes
    3 Posts
    415 Views
    S
    @mrjj Yes, almost: text graphic obejct instead of ractangle. But thanks for this suggestion, it's was very usefull, because I found problem. My problem was that I set focus on scene widget before adding the widget to tab widget. As I see, qt clear focus from the scene widget after adding to tab widget. I have added setting focus on scene after addTab statement and now it works.
  • "I am ready to receive Signals" signal

    Unsolved
    6
    0 Votes
    6 Posts
    619 Views
    dheerendraD
    Most closest is started signal. Run is called immediately after sending signal. Nothing in between.
  • How to open another application from Qt application with specific file

    Solved
    5
    0 Votes
    5 Posts
    3k Views
    aha_1980A
    @Niagarer But is there a way to specity, which application should be started with the file as parameter (like "open with")? No. Just use QProcess for that and give the file as parameter. Regards