Forum


Notice to all users

We are migrating towards a new forum system located at community.teamspeak.com, as such this forum will become read-only on January 29, 2020

Results 1 to 9 of 9
  1. #1
    Join Date
    July 2014
    Posts
    14

    Using a Qt GUI within my plugin's configuration

    I have already created a GUI with Qt-Creator, so now I have the following files: main.cpp, configuration.cpp, configuration.h and configuration.ui.
    How do I integrate these files into my teamspeak-plugin as a configuration window?

    ts3plugin_offersConfigure() { return PLUGIN_OFFERS_CONFIGURE_QT_THREAD; } has already been set.
    I guess that I have to use ts3plugin_configure(void* handle, void* qParentWidget) { } now, but how?

    Unfortunately, I haven't found helpful tutorials or something like this yet... :'(

    Thanks in advance!

  2. #2
    Join Date
    September 2012
    Posts
    6,079
    That depends on how your code works.

    You either create your dialog inside the configure(void*, void*) function and display it, or if you created the dialog beforehand already you simply display it when this function is called.
    See QDialog:pen and / or QWidget::show.
    When sending PMs please make sure to include a reference link to the thread in question in the body of your message.

  3. #3
    Join Date
    July 2014
    Posts
    14
    Thanks for your tip so far.

    So when I want to use QWidget::show, qt-project.org says that I have to #include <QWidget>.
    After including this, I get the following error: "Error: cannot open source file 'QWidget'".
    How do I include it properly?

  4. #4
    Join Date
    September 2012
    Posts
    6,079
    QDialog is derived from QWidget as such you don't have to include it, as it will automatically be included when you include QDialog.

    What you have to include depends on your include paths, QtCreator kind of knows what is where and will work with include <QWidget> and stuff like that, if you're using Visual Studio and your include path is just the include folder of Qt then you'll need to include QtWidgets\QDialog since QDialog and QWidget is in the QtWidgets part of Qt.
    When sending PMs please make sure to include a reference link to the thread in question in the body of your message.

  5. #5
    Join Date
    July 2014
    Posts
    14
    I am using VS2013.
    How do I set my include path to the include folder of Qt?

    At the beginning I have just extracted the plugin_sdk-archiv into my Teamspeak 3-folder under Program Files (x86).
    So it looks like this:
    C:\Program Files (x86)\TeamSpeak 3 Client\pluginsdk\src // here are my source/header/ui-files.
    C:\Program Files (x86)\TeamSpeak 3 Client\ // here are the normal Qt*.dlls

    C:\Qt //is where I have installed Qt (Creator)

  6. #6
    Join Date
    September 2012
    Posts
    6,079
    Quote Originally Posted by Dione View Post
    How do I set my include path to the include folder of Qt?
    In the Project Properties, C++, Additional Include Paths


    Quote Originally Posted by Dione View Post
    At the beginning I have just extracted the plugin_sdk-archiv into my Teamspeak 3-folder under Program Files (x86).
    So it looks like this:
    C:\Program Files (x86)\TeamSpeak 3 Client\pluginsdk\src // here are my source/header/ui-files.
    C:\Program Files (x86)\TeamSpeak 3 Client\ // here are the normal Qt*.dlls
    bad...
    When sending PMs please make sure to include a reference link to the thread in question in the body of your message.

  7. #7
    Join Date
    July 2014
    Posts
    14
    Ok, and where do I find the Qt libs that I have to include?

    What do you exactly mean with 'bad...'?

  8. #8
    Join Date
    September 2012
    Posts
    6,079
    bad because TeamSpeak includes its own Qt DLLs and you don't need the ones that came with Qt.

    The include path should be somthing like C:\Qt\qtbase\include in your case.


    Note that if you plan on supporting both 64 and 32 bit clients you'll need two different Qt Versions, one for 64 bit and one for 32 bit. As such it might be advisable to change your folder structure somewhat. Something like X:\Qt\x86\5.3.0 and X:\Qt\x64\5.3.0 might be better. X of course being whatever drive you want to put your Qt Files on and 5.3.0 being the Qt version you have.
    When sending PMs please make sure to include a reference link to the thread in question in the body of your message.

  9. #9
    Join Date
    July 2014
    Posts
    14
    I have already thought something like this, but I was not sure.
    Ok, thank you very much for your answers. I hope that I am able to work with my Qt GUI now.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Regarding the configuration
    By Ali Qureshi in forum Windows
    Replies: 0
    Last Post: June 1st, 2015, 11:09 PM
  2. Help with making setting/configuration for plugin.
    By Tylerjet in forum Client Plugins / Lua Scripts
    Replies: 7
    Last Post: January 7th, 2015, 10:27 AM
  3. Replies: 1
    Last Post: May 10th, 2012, 08:16 AM
  4. ts3 overlay plugin (Failed to open plugin)
    By netmario in forum Windows
    Replies: 0
    Last Post: September 22nd, 2010, 09:29 AM
  5. Replies: 0
    Last Post: April 9th, 2010, 01:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •